/* Custom styles for Simple Strategic Plans */

/* Additional utility classes */
.policy-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Ensure proper spacing and typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Rich Text Editor Styles */
.rich-text-editor {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
}

.rich-text-editor .ql-container {
    font-size: 0.875rem;
    min-height: 150px;
}

.rich-text-editor .ql-editor {
    min-height: 150px;
}

.rich-text-editor .ql-editor.ql-blank::before {
    color: #9ca3af;
    font-style: normal;
}

/* Rich Text Content Display */
.rich-text-content {
    line-height: 1.75;
}

.rich-text-content p {
    margin-bottom: 1em;
}

.rich-text-content p:last-child {
    margin-bottom: 0;
}

.rich-text-content ul,
.rich-text-content ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
    padding-left: 1.5em;
    list-style-position: outside;
}

.rich-text-content ul {
    list-style-type: disc;
}

.rich-text-content ol {
    list-style-type: decimal;
}

.rich-text-content li {
    margin-bottom: 0.5em;
    display: list-item;
}

.rich-text-content a {
    color: #2563eb;
    text-decoration: underline;
}

.rich-text-content a:hover {
    color: #1d4ed8;
}

.rich-text-content strong,
.rich-text-content b {
    font-weight: 600;
}

.rich-text-content em,
.rich-text-content i {
    font-style: italic;
}

.rich-text-content u {
    text-decoration: underline;
}

/* Dropdown menu improvements */
nav .group:hover .group-hover\:visible {
    visibility: visible;
}

nav .group:hover .group-hover\:opacity-100 {
    opacity: 1;
}
/* Demo instance and cross-links */
.demo-banner { background: #2f484b; color: #fff; text-align: center; padding: 0.55rem 1rem; font-size: 0.9rem; line-height: 1.4; }
.demo-banner strong { text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.4rem; color: #e8cf86; }
.demo-banner a { color: #fff; text-decoration: underline; text-underline-offset: 0.18em; margin-left: 0.35rem; }
.demo-login-help { border: 1px solid #dcd8cd; background: #fff; color: #0d2b2e; padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-radius: 6px; }
.demo-login-help h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.demo-login-help p, .demo-login-help ul { margin: 0 0 0.4rem; }
.demo-login-help ul { padding-left: 1.2rem; list-style: disc; }
.demo-other-products { margin: 1rem 0 0; padding: 0 1rem 1rem; text-align: center; font-size: 0.9rem; color: rgba(255,255,255,0.8); }
.demo-other-products a { color: #fff; text-decoration: underline; }

/* Product pages (dashboard, landing): flat, ruled, readable. Uses the suite tokens. */
.sp-page { width: 100%; }
.sp-page h1, .sp-page h2, .sp-page h3 { font-family: 'Bricolage Grotesque', 'IBM Plex Sans', sans-serif; font-weight: 700; letter-spacing: -0.01em; }
.sp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 0 0 1.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule, #dcd8cd); }
.sp-head h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.1; color: var(--ink, #0d2b2e); }
.sp-sub { margin: 0.35rem 0 0; color: var(--ink-soft, #2f484b); }
.sp-head__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.sp-btn { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.5rem 1.1rem; background: var(--brand, #0e5f5a); color: #fff; font-weight: 600; text-decoration: none; border: 1px solid var(--brand, #0e5f5a); border-radius: 6px; }
.sp-btn:hover { background: var(--brand-deep, #0a4a46); }
.sp-btn--ghost { background: transparent; color: var(--brand, #0e5f5a); }
.sp-btn--ghost:hover { background: var(--brand-tint, #e7f0ef); }
.sp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 2.5rem; border: 1px solid var(--rule, #dcd8cd); border-radius: 8px; background: #fff; }
.sp-stats > div { padding: 1.25rem 1.4rem; border-left: 1px solid var(--rule, #dcd8cd); }
.sp-stats > div:first-child { border-left: 0; }
.sp-stats dt { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #53686a); }
.sp-stats dd { margin: 0.3rem 0 0.15rem; font-family: 'Bricolage Grotesque', 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--ink, #0d2b2e); }
.sp-stats dd span { font-size: 1.3rem; margin-left: 0.1rem; }
.sp-stats .sp-stat-note { margin: 0; font-weight: 400; font-size: 0.88rem; color: var(--muted, #53686a); }
.sp-section { margin: 0 0 2.5rem; }
.sp-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.9rem; }
.sp-section__head h2 { margin: 0; font-size: 1.3rem; color: var(--ink, #0d2b2e); }
.sp-section__head a { font-weight: 600; color: var(--brand, #0e5f5a); }
.sp-table-wrap { overflow-x: auto; border: 1px solid var(--rule, #dcd8cd); border-radius: 8px; background: #fff; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.sp-table th, .sp-table td { text-align: left; padding: 0.85rem 1rem; border-top: 1px solid var(--rule-soft, #ebe8df); vertical-align: middle; }
.sp-table thead th { border-top: 0; background: var(--paper, #f7f5f0); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #53686a); }
.sp-table tbody th { font-weight: 600; }
.sp-table tbody th a { color: var(--ink, #0d2b2e); text-decoration: none; }
.sp-table tbody th a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.sp-nowrap { white-space: nowrap; }
.sp-num { display: inline-block; min-width: 2.2rem; padding: 0.1rem 0.4rem; margin-right: 0.4rem; background: var(--brand-tint, #e7f0ef); color: var(--brand-deep, #0a4a46); font-size: 0.8rem; font-weight: 600; text-align: center; border-radius: 4px; }
.sp-progress { height: 0.5rem; min-width: 7rem; background: var(--rule-soft, #ebe8df); border-radius: 999px; overflow: hidden; }
.sp-progress span { display: block; height: 100%; background: var(--brand, #0e5f5a); }
.sp-progress__text { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--ink, #0d2b2e); }
.sp-chip { display: inline-block; padding: 0.05rem 0.5rem; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--rule, #dcd8cd); border-radius: 999px; color: var(--ink-soft, #2f484b); background: #fff; }
.sp-chip--done { background: var(--brand-tint, #e7f0ef); border-color: #b4d6d1; color: var(--brand-deep, #0a4a46); }
.sp-goals { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule, #dcd8cd); border-radius: 8px; background: #fff; }
.sp-goals li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 11rem; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; border-top: 1px solid var(--rule-soft, #ebe8df); }
.sp-goals li:first-child { border-top: 0; }
.sp-goals__n { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; background: var(--ink, #0d2b2e); color: #fff; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; border-radius: 6px; }
.sp-goals h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.sp-goals h3 a { color: var(--ink, #0d2b2e); text-decoration: none; }
.sp-goals h3 a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.sp-goals p { margin: 0; color: var(--ink-soft, #2f484b); font-size: 0.93rem; line-height: 1.5; }
.sp-goals .sp-meta { margin-top: 0.3rem; font-size: 0.85rem; color: var(--muted, #53686a); }
@media (max-width: 900px) { .sp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sp-stats > div:nth-child(3) { border-left: 0; } .sp-stats > div:nth-child(n+3) { border-top: 1px solid var(--rule, #dcd8cd); } }
@media (max-width: 640px) { .sp-goals li { grid-template-columns: 2.5rem minmax(0, 1fr); } .sp-goals__progress { grid-column: 1 / -1; } }

/* Landing page */
.sp-lp { padding-top: 0; }
.sp-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1rem, 3vw, 2rem) 0 clamp(2rem, 4vw, 3rem); }
.sp-eyebrow { margin: 0 0 0.75rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand, #0e5f5a); }
.sp-hero h1 { margin: 0 0 1rem; font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.1; max-width: 18ch; color: var(--ink, #0d2b2e); }
.sp-lead { margin: 0 0 1.5rem; font-size: 1.15rem; line-height: 1.6; color: var(--ink-soft, #2f484b); max-width: 48ch; }
.sp-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.sp-note { margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--muted, #53686a); }
.sp-hero__shot { margin: 0; }
.sp-hero__shot img, .sp-split img { display: block; width: 100%; height: auto; border: 1px solid var(--rule, #dcd8cd); border-radius: 8px; background: #fff; }
.sp-lp__section { padding: clamp(1.75rem, 4vw, 2.75rem) 0 0; }
.sp-lp__section h2, .sp-split h2, .sp-cta h2 { margin: 0 0 1.1rem; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.sp-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.5rem; border-top: 1px solid var(--rule, #dcd8cd); }
.sp-features li { padding: 1.25rem 0; border-bottom: 1px solid var(--rule, #dcd8cd); }
.sp-features h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.sp-features p { margin: 0; color: var(--ink-soft, #2f484b); line-height: 1.55; }
.sp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.sp-steps li { padding: 1.4rem 1.4rem 1.5rem; background: #fff; border: 1px solid var(--rule, #dcd8cd); border-radius: 8px; }
.sp-steps span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-bottom: 0.8rem; background: var(--ink, #0d2b2e); color: #fff; font-weight: 700; border-radius: 6px; }
.sp-steps h3 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.sp-steps p { margin: 0; color: var(--ink-soft, #2f484b); line-height: 1.55; }
.sp-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.sp-split p { color: var(--ink-soft, #2f484b); line-height: 1.6; max-width: 46ch; }
.sp-split figure { margin: 0; }
.sp-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 1rem; background: var(--ink, #0d2b2e); color: #fff; border-radius: 8px; }
.sp-cta h2 { margin: 0 0 0.3rem; color: #fff; }
.sp-cta p { margin: 0; color: #dde9e7; max-width: 52ch; }
.sp-btn--light { background: #fff; color: var(--ink, #0d2b2e); border-color: #fff; }
.sp-btn--light:hover { background: var(--brand-tint, #e7f0ef); }
@media (max-width: 900px) { .sp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sp-hero, .sp-split { grid-template-columns: minmax(0, 1fr); } .sp-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .sp-features { grid-template-columns: minmax(0, 1fr); } }

/* Full-bleed ink bands: the dark teal of the footer, used for the main moments on a page. */
body { overflow-x: clip; }
.sp-band { background: var(--ink, #0d2b2e); color: #fff; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%); }
.sp-band--first { margin-top: -2rem; }
.demo-tour ~ * .sp-band--first, .demo-tour ~ .sp-band--first { margin-top: 0; }
.sp-band--last { margin-bottom: -2rem; margin-top: 2rem; }
.sp-band h1, .sp-band h2, .sp-band h3 { color: #fff; }
.sp-band .sp-lead, .sp-band .sp-sub, .sp-band p { color: #dde9e7; }
.sp-band .sp-eyebrow { color: #e8cf86; }
.sp-band .sp-note { color: #bcd0cd; }
.sp-band .sp-btn { background: #fff; color: var(--ink, #0d2b2e); border-color: #fff; }
.sp-band .sp-btn:hover { background: var(--brand-tint, #e7f0ef); }
.sp-band .sp-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.sp-band .sp-btn--ghost:hover { background: rgba(255,255,255,0.1); }
.sp-band .sp-hero__shot img { border-color: #2d5156; }
.sp-band--first .sp-hero { padding-top: clamp(2.25rem, 5vw, 3.5rem); padding-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.sp-band--tight { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.sp-band--tight .sp-head { border-bottom-color: rgba(255,255,255,0.18); }
.sp-band--tight .sp-stats { margin-bottom: 0; background: transparent; border-color: rgba(255,255,255,0.22); }
.sp-band--tight .sp-stats > div { border-left-color: rgba(255,255,255,0.22); }
.sp-band--tight .sp-stats dt, .sp-band--tight .sp-stats .sp-stat-note { color: #bcd0cd; }
.sp-band--tight .sp-stats dd { color: #fff; }
.sp-band--steps { margin-top: 2.5rem; padding-top: 0.5rem; padding-bottom: 2.75rem; }
.sp-band--steps .sp-steps li { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.sp-band--steps .sp-steps span { background: #e8cf86; color: var(--ink, #0d2b2e); }
.sp-band--steps .sp-steps p { color: #dde9e7; }
.sp-band--last { padding-top: 2.25rem; padding-bottom: 2.25rem; }
.sp-band--last .sp-cta { background: transparent; padding: 0; margin: 0; max-width: 100%; }
.sp-section--first { margin-top: 2.25rem; }

.sp-flash ~ .sp-page .sp-band--first { margin-top: 0; }
.sp-split p + p { margin-top: 1.25rem; }

/* Demonstration: one-click entry, role switch and the guide */
.hp { position: absolute; left: -9999px; top: auto; }
.demo-enter { margin: 0 0 1.25rem; padding: 1rem 1.1rem; background: #fff; border: 2px solid #0d2b2e; }
.demo-enter h2 { margin: 0 0 .25rem; font-size: 1.15rem; font-weight: 600; }
.demo-muted { color: #2f484b; font-size: .9rem; }
.demo-enter__btns { display: grid; gap: .6rem; margin-top: .75rem; }
.demo-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .15rem; min-height: 56px; padding: .65rem 1rem; text-align: left; width: 100%; font-weight: 600; font-size: 1rem; cursor: pointer; border: 2px solid #0d2b2e; border-radius: 4px; }
.demo-btn span { font-size: .85rem; font-weight: 400; }
.demo-btn--primary { background: #0d2b2e; color: #fff; }
.demo-btn--secondary { background: #fff; color: #0d2b2e; }
.demo-btn:focus-visible { outline: 3px solid #3f2766; outline-offset: 3px; }
.demo-switch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; margin: 0; }
.demo-linkbtn { display: inline-flex; align-items: center; background: none; border: 0; padding: .35rem 0; font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; color: inherit; min-height: 44px; }
.demo-tour { margin: 0 0 1.5rem; padding: .25rem 1.1rem 1rem; background: #fff; border: 2px solid #0d2b2e; }
.demo-tour > summary { cursor: pointer; padding: .8rem 0; min-height: 44px; }
.demo-tour ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .6rem; max-width: 52rem; }

/* Skip link: off screen until it is focused with the keyboard */
.skip-link { position: absolute; left: -9999px; top: 0.5rem; z-index: 1000; padding: 0.6rem 1rem; background: #fff; color: #1e3a8a; border-radius: 0.375rem; font-weight: 600; text-decoration: underline; }
.skip-link:focus { left: 0.5rem; outline: 3px solid #2563eb; outline-offset: 2px; }
main:focus { outline: none; }


/* ---- Accessibility layer (2 Dec 2026): targets, focus, keyboard menus. Checked by tests/tools/a11y_audit.py ---- */
body header button, body header summary { min-height: 44px; }
body header a:not(.skip-link) { display: inline-flex; align-items: center; min-height: 44px; }
body header button[class*="flex"], body header nav button { display: inline-flex; align-items: center; min-width: 44px; padding-left: .5rem; padding-right: .5rem; }
body main input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]), body main select, body main button:not(.ql-toolbar button), body main .btn { min-height: 44px; }
body main input[type=checkbox], body main input[type=radio] { width: 1.5rem; height: 1.5rem; }
body main textarea { min-height: 6rem; }
.ql-toolbar button { min-width: 44px; min-height: 44px; }
/* Links in tables and lists are real targets, not just words in a sentence */
body main td a, body main th a, body main li > a, body main .text-sm > a, body main a.text-sm { display: inline-block; min-height: 24px; padding-block: .15rem; }
body main td a { min-height: 44px; display: inline-flex; align-items: center; }
/* Focus: always a 3px ring, white on the dark header, blue elsewhere */
body a:focus-visible, body button:focus-visible, body input:focus-visible, body select:focus-visible, body textarea:focus-visible, body summary:focus-visible, body [tabindex]:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
body header a:focus-visible, body header button:focus-visible, body footer a:focus-visible, body header summary:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
body input:focus, body select:focus, body textarea:focus { outline: 3px solid #1d4ed8; outline-offset: 2px; }
/* The menus open for keyboard users too, not only when the pointer is over them */
li.group:focus-within > div.absolute { opacity: 1; visibility: visible; }
/* Text colours that are readable on white and on the pale greys used for panels (4.5:1 or better) */
.text-gray-400, .text-gray-500 { color: #4b5563; }
.text-yellow-600, .text-yellow-500 { color: #854d0e; }
.text-green-500, .text-green-600 { color: #166534; }
.text-red-500, .text-red-600 { color: #b91c1c; }
code { color: #1f2937; }

.bg-yellow-600, .bg-yellow-500 { background-color: #854d0e; }
.demo-banner a { display: inline-flex; align-items: center; min-height: 44px; }
.demo-banner .demo-linkbtn { color: #fff; }
main a.text-blue-600, main a.text-blue-700 { display: inline-block; min-height: 24px; }
.sp2-foot a, .sp2-links a, .sp2-nav a, .sp2-head a { display: inline-flex; align-items: center; min-height: 44px; }
/* The shared suite stylesheet shrinks this button; it is a real target, so it stays 44px */
body .demo-banner .demo-linkbtn { min-height: 44px !important; display: inline-flex !important; }
/* Narrow screens: long words, addresses and buttons wrap instead of pushing the page wider; wide tables scroll inside their own box */
main { overflow-wrap: anywhere; min-width: 0; }
main a, main button, main strong, main code { max-width: 100%; }
main a.px-4, main a.px-6, main button.px-4, main button.px-6 { white-space: normal; }
.overflow-x-auto { max-width: 100%; }
input[type=color] { min-width: 44px; min-height: 44px; padding: 2px; }
.story .proj .pct { white-space: normal; }
.sp2-head__cta { flex-wrap: wrap; justify-content: flex-end; }
input[type=checkbox], input[type=radio] { flex-shrink: 0; min-width: 1.5rem; min-height: 1.5rem; }
input.flex-1 { min-width: 0; }
