@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* =============================================================================
   Smart SWOT — app chrome (header, home, auth, org/admin).
   Board / item / quadrant workspace keep their own inline styles.
   ============================================================================= */

:root {
  --ink: #0b1220;
  --text: #132036;
  --muted: #5b6b7c;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --accent-deep: #134e4a;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --accent-glow: rgba(20, 184, 166, 0.22);
  --bg: #eef3f2;
  --bg-mist: #f4faf8;
  --card: #ffffff;
  --border: rgba(15, 40, 50, 0.1);
  --danger: #b91c1c;
  --warn: #b45309;
  --ok: #15803d;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft: 0 10px 30px rgba(11, 18, 32, 0.06);
  --shadow-float: 0 18px 50px rgba(11, 18, 32, 0.12);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background: var(--bg);
}

/* Atmosphere for chrome pages only (home / org / admin / auth) */
body.app-shell {
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(15, 118, 110, 0.16), transparent 55%),
    radial-gradient(700px 380px at 92% 0%, rgba(15, 23, 42, 0.08), transparent 50%),
    linear-gradient(180deg, #f7fbfa 0%, var(--bg) 42%, #e8eef0 100%);
  background-attachment: fixed;
}

a { color: var(--accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.impersonation-banner {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #1f2937;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
}
.impersonation-banner a { color: #1f2937; font-weight: 700; }

/* ----- Header chrome (fixed teal; survives board :root overrides) ----- */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.7rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 30;
  color: #ecfdf8;
  background:
    linear-gradient(135deg, #0b3d3a 0%, #0f766e 52%, #0f766e 72%, #0d9488 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(11, 18, 32, 0.18);
}
.app-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0V0zm12 12h1v1h-1v-1z' fill='%23ffffff'/%3E%3C/svg%3E");
}
.app-header-brand,
.app-header-nav { position: relative; z-index: 1; }

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 9px;
  overflow: hidden;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.5px;
  padding: 0;
  background: rgba(4, 47, 46, 0.5);
  color: #042f2e;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 6px 14px rgba(0,0,0,0.18);
}
.brand-mark span {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #99f6e4, #14b8a6 45%, #0f766e);
  text-decoration: none !important;
  border: 0;
}
.brand {
  font-weight: 800;
  font-size: 1.42rem;
  text-decoration: none !important;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.brand span {
  color: #5eead4;
  font-weight: 700;
  text-decoration: none !important;
}

.app-header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.app-header-nav > a {
  text-decoration: none;
  color: rgba(236, 253, 245, 0.82) !important;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.app-header-nav > a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
}

.user-menu { position: relative; margin-left: 0.35rem; }
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  max-width: min(16rem, 42vw);
}
.user-menu--multi .user-menu-trigger {
  padding-right: 0.55rem;
}
.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.22);
}
.user-menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #ccfbf1, #5eead4);
  color: #134e4a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.user-menu-org-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
  text-align: left;
}
.user-menu-org-chip-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(204, 251, 241, 0.85);
}
.user-menu-org-chip-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9.5rem;
}
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 15rem;
  padding: 0.45rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  z-index: 50;
  animation: menu-in 0.16s var(--ease);
}
.user-menu-panel--wide {
  min-width: 18.5rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-menu-identity { padding: 0.55rem 0.65rem 0.45rem; }
.user-menu-name { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.user-menu-username { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.user-menu-label {
  display: block;
  margin: 0.35rem 0.65rem 0.25rem;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.user-menu-current-org { padding: 0 0.35rem 0.15rem; }
.user-menu-org-card {
  margin: 0 0.15rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfdf5 100%);
}
.user-menu-org-card.is-current {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}
.user-menu-org-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.user-menu-org-card-name {
  font-weight: 750;
  font-size: 1rem;
  color: var(--accent-deep);
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}
.user-menu-org-card-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
  background: #fff;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  margin-top: 0.1rem;
}
.user-menu-org-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.user-menu-org-open {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--accent) !important;
  text-decoration: none;
}
.user-menu-org-open:hover { text-decoration: underline; }
.user-menu-org-list {
  list-style: none;
  margin: 0;
  padding: 0 0.2rem 0.2rem;
  max-height: 14rem;
  overflow-y: auto;
}
.user-menu-org-list li { margin: 0; }
.user-menu-org-switch-form { margin: 0; }
.user-menu-org-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin: 0.15rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.user-menu-org-option:hover,
.user-menu-org-option:focus-visible {
  background: #f0fdfa;
  border-color: #99f6e4;
  outline: none;
}
.user-menu-org-option-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.25;
  word-break: break-word;
}
.user-menu-org-option-meta {
  font-size: 0.75rem;
  color: var(--muted);
}
.user-menu-sep { height: 1px; margin: 0.25rem 0.35rem; background: var(--border); }
.user-menu-item {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: var(--text) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.user-menu-item:hover { background: #f0fdfa; color: var(--accent) !important; }
.user-menu-item-danger { color: var(--danger) !important; }
.user-menu-item-danger:hover { background: #fef2f2; color: var(--danger) !important; }

@media (max-width: 640px) {
  .user-menu-org-chip { display: none; }
  .user-menu--multi .user-menu-trigger { padding-right: 0; }
}

/* ----- Auth ----- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem 3rem;
  background:
    radial-gradient(700px 360px at 15% 10%, rgba(15, 118, 110, 0.2), transparent 60%),
    radial-gradient(600px 320px at 90% 0%, rgba(15, 23, 42, 0.12), transparent 55%),
    linear-gradient(165deg, #0b3d3a 0%, #134e4a 35%, #e8f2f0 35.1%, #f4faf8 100%);
}
.auth-card {
  width: min(100%, 26rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.6rem 1.55rem 1.45rem;
  box-shadow: var(--shadow-float);
  animation: fade-up 0.45s var(--ease) both;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}
.auth-brand .brand-mark { width: 2.95rem; height: 2.95rem; font-size: 1.05rem; }
.auth-brand strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.auth-brand span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.1rem;
}
.auth-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.auth-card .muted { margin-top: 0; }

/* ----- Panels / forms — scoped to chrome pages only (not board/item/quadrant) ----- */
.app-shell .panel,
.auth-shell .panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.app-shell .panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), #14b8a6);
  opacity: 0.9;
}
.app-shell .panel h1,
.app-shell .panel h2 { margin-top: 0; letter-spacing: -0.02em; color: var(--ink); }

.app-shell label,
.auth-shell label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
}
.app-shell input[type="text"],
.app-shell input[type="email"],
.app-shell input[type="password"],
.app-shell select,
.app-shell textarea,
.auth-shell input[type="text"],
.auth-shell input[type="email"],
.auth-shell input[type="password"],
.auth-shell select,
.auth-shell textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus,
.auth-shell input:focus,
.auth-shell select:focus,
.auth-shell textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.app-shell .btn,
.app-shell button.btn,
.auth-shell .btn,
.auth-shell button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #14958c, var(--accent));
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.25);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
/* :not(.btn-secondary) so primary hover never loses to secondary’s white bg */
.app-shell .btn:hover:not(.btn-secondary),
.app-shell button.btn:hover:not(.btn-secondary),
.auth-shell .btn:hover:not(.btn-secondary),
.auth-shell button.btn:hover:not(.btn-secondary) {
  background: linear-gradient(180deg, #0d9488, #0f766e);
  color: #fff;
  transform: translateY(-1px);
}
.app-shell .btn:active,
.auth-shell .btn:active { transform: scale(0.98); }
/* Match button.btn specificity (0,2,1) so secondary isn’t teal + white text */
.app-shell .btn.btn-secondary,
.app-shell button.btn.btn-secondary,
.auth-shell .btn.btn-secondary,
.auth-shell button.btn.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
.app-shell .btn.btn-secondary:hover,
.app-shell button.btn.btn-secondary:hover,
.auth-shell .btn.btn-secondary:hover,
.auth-shell button.btn.btn-secondary:hover {
  background: #f8fafc;
  color: var(--text);
  transform: translateY(-1px);
}
.app-shell .btn-danger,
.app-shell button.btn.btn-danger { background: var(--danger); box-shadow: none; color: #fff; }

.app-shell .alert,
.auth-shell .alert { padding: 0.7rem 0.85rem; border-radius: 10px; margin: 0.75rem 0; font-size: 0.9rem; }
.app-shell .alert-error,
.auth-shell .alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.app-shell .alert-success,
.auth-shell .alert-success { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }
.app-shell .alert-warn { background: #fffbeb; color: var(--warn); border: 1px solid #fde68a; }

.app-shell .page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.35rem 1.25rem 3.5rem;
}
.app-shell .data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.app-shell .data-table th,
.app-shell .data-table td {
  text-align: left;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
.app-shell .data-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.app-shell .muted,
.auth-shell .muted { color: var(--muted); font-size: 0.9rem; }
.app-shell .stack-gap > * + *,
.auth-shell .stack-gap > * + * { margin-top: 0.75rem; }
.app-shell .action-bar,
.auth-shell .action-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* ----- Home dashboard ----- */
.home-hero {
  margin: 0 0 1.35rem;
  padding: 1.85rem 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background:
    radial-gradient(900px 320px at 0% 0%, rgba(15, 118, 110, 0.18), transparent 55%),
    radial-gradient(700px 280px at 100% 0%, rgba(15, 23, 42, 0.08), transparent 50%),
    linear-gradient(145deg, #ffffff 0%, #f0fdfa 60%, #ecfeff 100%);
  box-shadow: var(--shadow-soft);
  animation: fade-up 0.5s var(--ease) both;
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: "";
  position: absolute;
  left: 1.25rem; right: 1.25rem; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--accent-deep), #14b8a6, transparent);
}
.home-hero h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
  font-weight: 800;
}
.home-hero p { margin: 0; color: var(--muted); max-width: 40rem; line-height: 1.55; font-size: 1.02rem; }
.home-hero .org-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 0.95rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent-deep);
  font-weight: 700;
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.16);
}
.home-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  animation: fade-up 0.55s var(--ease) 0.06s both;
}
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
}
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { margin: 0; }
.board-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  margin-bottom: 0.55rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.board-card:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.1);
  transform: translateY(-2px);
}
.board-card.is-last {
  border-color: rgba(15, 118, 110, 0.4);
  background: linear-gradient(180deg, #f0fdfa, #ffffff);
}
.board-card__main {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.board-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}
.board-card h3 { margin: 0 0 0.2rem; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--ink); }
.board-card .meta { font-size: 0.82rem; color: var(--muted); }
.board-card .count {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--accent);
  white-space: nowrap;
}
.board-edit-btn {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  white-space: nowrap;
}
.board-edit-btn:hover,
.board-edit-btn:focus-visible {
  color: var(--accent);
}
.board-edit-modal {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  max-width: 420px;
  width: calc(100% - 2rem);
  background: var(--card, #fff);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}
.board-edit-modal::backdrop {
  background: rgba(15, 23, 42, 0.35);
}
.board-edit-modal__inner {
  margin: 0;
  padding: 1.15rem 1.25rem 1.25rem;
}
.board-edit-modal__head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.board-edit-modal__head p { margin: 0 0 0.35rem; }
.board-edit-modal .action-bar { margin-top: 0.35rem; }
.empty-cta h2 { margin-top: 0; }
.vis-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.app-about {
  margin: 0 0 1.25rem;
  padding: 1.2rem 1.3rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f7fffe 100%);
  box-shadow: var(--shadow-soft);
  animation: fade-up 0.5s var(--ease) 0.04s both;
}
.app-about h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.app-about p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 46rem;
}
.app-about ul {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--text);
  line-height: 1.55;
}
.app-about li + li { margin-top: 0.28rem; }

/* ----- Home learning intros (SWOT / TOWS) ----- */
.home-learn {
  margin-top: 1.5rem;
  padding: 1.5rem 1.4rem 1.5rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background:
    radial-gradient(720px 220px at 0% 0%, rgba(15, 118, 110, 0.12), transparent 55%),
    linear-gradient(165deg, #ffffff 0%, #f5fffd 55%, #eefaf8 100%);
  box-shadow: var(--shadow-soft);
  animation: fade-up 0.55s var(--ease) 0.1s both;
  position: relative;
  overflow: hidden;
}
.home-learn::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent-deep), #14b8a6, transparent);
}
.home-learn-head {
  margin: 0 0 1.15rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(15, 118, 110, 0.12);
}
.home-learn-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.home-learn-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}
.home-learn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 720px) {
  .home-learn-grid { grid-template-columns: 1fr; }
}
.home-learn-item {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
  box-shadow: 0 6px 18px rgba(11, 18, 32, 0.04);
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.home-learn-item:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 10px 28px rgba(11, 18, 32, 0.07);
}
.home-learn-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-deep), #14b8a6);
}
.home-learn-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.home-learn-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.home-learn-tldr {
  margin: 0 0 1.05rem;
  flex: 1;
}
.home-learn-tldr p {
  margin: 0 0 0.7rem;
  color: var(--text);
  line-height: 1.58;
  font-size: 0.9rem;
}
.home-learn-tldr p:last-child {
  margin-bottom: 0;
}
.home-learn-tldr strong {
  font-weight: 700;
  color: var(--accent-deep);
}
.home-learn-item .btn {
  font-size: 0.88rem;
  align-self: flex-start;
  margin-top: auto;
}

/* Public marketing footer */
.pub-foot {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.pub-foot-copy { margin: 0; }
.pub-explore {
  margin-top: 2.35rem;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background: linear-gradient(180deg, #fff 0%, #f7fffe 100%);
}
.pub-explore h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pub-explore ul {
  margin: 0;
  padding-left: 1.2rem;
}
.pub-explore li { margin-bottom: 0.4rem; }
.pub-explore a { font-weight: 650; }

/* Public product screenshot insets (click to enlarge)
   Never use width:auto on the figure — with img { width:100% } that creates a
   circular percentage, so the img falls back to its HTML/intrinsic width and
   paints outside the figure (max-width on the figure alone does not clip it). */
.pub-shot {
  margin: 0.85rem 0 1.15rem;
  max-width: min(300px, 100%);
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-sizing: border-box;
}
.pub-shot--right {
  float: right;
  width: 100%;
  max-width: min(300px, 100%);
  margin: 0.15rem 0 1rem 1.25rem;
}
.pub-shot--left {
  float: left;
  width: 100%;
  max-width: min(300px, 100%);
  margin: 0.15rem 1.25rem 1rem 0;
}
.pub-shot--bar,
.pub-shot--center {
  float: none;
  display: block;
  width: 100%;
  max-width: min(360px, 100%);
  margin: 1rem auto 1.25rem;
}
.pub-shot--bar {
  max-width: min(28rem, 100%);
}
/* Home “See the workspace” — vertical stack at full content-column width */
.pub-shot-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.pub-shot-stack .pub-shot,
.pub-shot-stack .pub-shot--right,
.pub-shot-stack .pub-shot--left,
.pub-shot-stack .pub-shot--center,
.pub-shot-stack .pub-shot--bar {
  float: none;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.pub-shot__btn {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 10px;
  line-height: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pub-shot__btn:focus-visible {
  outline: 2px solid var(--accent, #0f766e);
  outline-offset: 3px;
}
.pub-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border-radius: 10px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  background: #fff;
  pointer-events: none;
  box-sizing: border-box;
}
.pub-shot figcaption {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 400;
  color: var(--muted, #5b6b7c);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.pub-shot-stack .pub-shot figcaption {
  font-size: 1em;
  font-style: normal;
  font-weight: 400;
  color: var(--text, #334155);
  line-height: 1.55;
}
.pub-shot-clear {
  max-width: 100%;
  min-width: 0;
}
.pub-shot-clear::after {
  content: "";
  display: table;
  clear: both;
}
/* Stack floats so text is not crushed beside insets */
@media (max-width: 720px) {
  .pub-shot--right,
  .pub-shot--left {
    float: none;
    display: block;
    width: 100%;
    max-width: min(100%, 20rem);
    margin: 0.85rem auto 1.15rem;
  }
  .pub-shot--bar,
  .pub-shot--center {
    max-width: min(100%, 22rem);
  }
  .pub-shot-stack .pub-shot,
  .pub-shot-stack .pub-shot--right,
  .pub-shot-stack .pub-shot--left,
  .pub-shot-stack .pub-shot--center,
  .pub-shot-stack .pub-shot--bar {
    max-width: 100%;
  }
}

.pub-lightbox {
  border: 0;
  padding: 0;
  margin: auto;
  max-width: min(96vw, 1100px);
  max-height: min(96dvh, 96vh);
  width: fit-content;
  background: transparent;
  color: inherit;
  overflow: visible;
}
.pub-lightbox::backdrop {
  background: rgba(11, 18, 32, 0.72);
}
.pub-lightbox__panel {
  position: relative;
  margin: 0;
  padding: 0.65rem;
  max-width: min(96vw, 1100px);
  max-height: min(94dvh, 94vh);
  width: 100%;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.pub-lightbox__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pub-lightbox__close:hover {
  background: rgba(15, 23, 42, 0.95);
}
.pub-lightbox__close:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}
.pub-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(90dvh, 90vh);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}
.pub-lightbox__caption {
  margin: 0.55rem 0.35rem 0.15rem;
  font-size: 0.9rem;
  color: #475569;
  text-align: center;
  font-style: italic;
  font-weight: 400;
  max-width: min(92vw, 40rem);
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 720px) {
  .pub-lightbox {
    max-width: calc(100vw - 1rem);
    width: calc(100vw - 1rem);
  }
  .pub-lightbox__panel {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem;
    border-radius: 12px;
  }
  .pub-lightbox__img {
    max-width: 100%;
    max-height: min(90dvh, 90vh);
  }
  .pub-lightbox__close {
    top: 0.25rem;
    right: 0.25rem;
  }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Pro upgrade modal (Phase A entitlements) ---- */
.swot-pro-modal {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 0;
  max-width: 420px;
  width: calc(100% - 2rem);
  background: var(--card, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}
.swot-pro-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.swot-pro-modal__inner { margin: 0; }
.swot-pro-modal__head {
  padding: 1.25rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.swot-pro-modal__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal, #0f766e);
}
.swot-pro-modal__title {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink, #0f172a);
}
.swot-pro-modal__lead {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted, #64748b);
  line-height: 1.45;
}
.swot-pro-modal__body { padding: 1rem 1.35rem 0.5rem; }
.swot-pro-modal__list-title {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
}
.swot-pro-modal__list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.55;
  font-size: 0.92rem;
  color: var(--text, #0f172a);
}
.swot-pro-modal__list li { margin-bottom: 0.35rem; }
.swot-pro-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  padding: 1rem 1.35rem 1.25rem;
}
.swot-pro-modal__cta:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
button.swot-pro-teaser,
a.swot-pro-teaser {
  cursor: pointer;
}
.mode-toggle a.swot-pro-teaser,
.mode-toggle button.swot-pro-teaser {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-decoration: none;
  padding: inherit;
  cursor: pointer;
}
.mode-toggle button.swot-pro-teaser:hover {
  color: var(--accent-deep, #134e4a);
}
.swot-pro-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #ecfdf5;
  color: #0f766e;
  border: 1px solid #a7f3d0;
  vertical-align: middle;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
