/**
 * LankaLux Astro — SWOT report (theme 1.20.0). Paper styles build on
 * astro-report.css (.llr-flow / .llr-page); this file adds the SWOT blocks
 * and the report-type picker. The paper stays light in dark mode.
 */

/* ---------------- Type picker ---------------- */
.llw-types { grid-column: 1 / -1; border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.llw-types legend { padding: 0; margin: 0 0 8px; font-size: 14px; color: var(--ll-muted, var(--ax-muted)); }
.llw-type { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--ax-border, #e3d9c2); border-radius: 14px; background: var(--ax-surface, #fff); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.llw-type:hover { transform: translateY(-1px); }
.llw-type input { position: absolute; opacity: 0; pointer-events: none; }
.llw-type__ico { flex: 0 0 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(var(--ax-gold-rgb, 168, 122, 0), .12); }
.llw-type__t { display: flex; flex-direction: column; gap: 2px; line-height: 1.4; min-width: 0; }
.llw-type__t b { font-size: 15px; color: var(--ax-text, #1d2433); }
.llw-type__t small { font-size: 12.5px; color: var(--ll-muted, var(--ax-muted)); }
.llw-type:has(input:checked) { border-color: var(--ax-gold, #a87a00); box-shadow: 0 0 0 3px rgba(var(--ax-gold-rgb, 168, 122, 0), .18); }
.llw-type input:focus-visible ~ .llw-type__ico { outline: 2px solid var(--ax-gold, #a87a00); outline-offset: 2px; }
@media (max-width: 760px) { .llw-types { grid-template-columns: 1fr; } }

/* ---------------- Cover ---------------- */
.llw-cover { margin-bottom: 14px; }
.llw-band { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: linear-gradient(120deg, #101a33, #1d2c52 70%, #2a2350); color: #fff; border-radius: 12px; padding: 18px 20px; }
.llw-band h1 { margin: 0 0 4px !important; color: #ffd21c !important; font-size: 26px; line-height: 1.3; }
.llw-band p { margin: 0 !important; color: #d5dcec !important; font-size: 13px; line-height: 1.55; }
.llw-band .llw-name { color: #fff !important; font-weight: 700; font-size: 16px; margin-top: 6px !important; }
.llw-band .llw-name:empty { display: none; }
.llw-brand { flex: 0 0 auto; text-align: right; line-height: 1.3; }
.llw-brand b { display: block; color: #ffd21c !important; letter-spacing: .06em; font-size: 15px; font-family: Georgia, 'Noto Serif', serif; }
.llw-brand span { display: block; color: #c9d3e3; letter-spacing: .14em; font-size: 10.5px; }
.llw-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.llw-tile { background: #fff; border: 1px solid var(--llr-line); border-top: 3px solid var(--llr-gold); border-radius: 10px; padding: 7px 10px; line-height: 1.35; min-width: 0; }
.llw-tile span { display: block; font-size: 11px; color: var(--llr-soft); }
.llw-tile b { display: block; font-size: 13.5px; color: var(--llr-navy); overflow-wrap: anywhere; }
.llw-tile small { display: block; font-size: 11.5px; color: var(--llr-soft); }

/* ---------------- Section headings ---------------- */
.llw-sec { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 2px solid var(--llr-gold); padding-bottom: 5px; margin-top: 20px !important; }
.llw-sec h2 { margin: 0; font-size: 20px; line-height: 1.35; }
.llw-sec span { flex: 0 0 auto; max-width: 40%; text-align: right; font-size: 11.5px; color: var(--llr-soft); line-height: 1.3; }

/* ---------------- Tables ---------------- */
.llw-tw { max-width: 100%; }
.llw-flow .llw-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.llw-table td small { display: block; color: var(--llr-soft); font-size: 11px; }
.llw-table td em { font-style: normal; color: var(--llr-maroon); font-size: 11.5px; }
.llw-nak { color: var(--llr-soft); font-size: 11.5px; }
.llw-houses td:nth-child(1) { width: 15%; }
.llw-houses td:nth-child(2) { width: 9%; }
.llw-houses td:nth-child(3) { width: 30%; }
.llw-houses tr.llw-dasha td { background: #fff6d6; }
.llw-str td:nth-child(4) { width: 22%; white-space: nowrap; }
.llw-sb { position: relative; display: inline-block; vertical-align: middle; width: calc(100% - 52px); height: 9px; background: #eee6d3; border-radius: 6px; overflow: hidden; }
.llw-sb i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #2f8a5b, #1f7a4c); }
.llw-sb i.is-low { background: linear-gradient(90deg, #d8862f, #a33a2b); }
.llw-sb u { position: absolute; left: 62.5%; top: -2px; bottom: -2px; width: 2px; background: #16213a; opacity: .55; }
.llw-sbv { display: inline-block; width: 46px; text-align: right; font-size: 12px; }
.llw-dates td:first-child { width: 17%; white-space: nowrap; }
.llw-tag { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 0 8px; line-height: 1.7; vertical-align: 1px; }
.llw-tag.is-good { background: #dcf1e4; color: #1f6b43; }
.llw-tag.is-warn { background: #fbe0dc; color: #9b2f22; }
.llw-tag.is-dasha { background: #e2eafb; color: #24478f; }
.llw-tag.is-goch { background: #ece3f8; color: #5b3a8c; }

/* ---------------- Prose + chips ---------------- */
.llw-prose p { font-size: 14px; line-height: 1.75; margin: 0 0 6px; }
.llw-chips > b { display: block; font-size: 13px; margin-bottom: 6px; }
.llw-chips > div { display: flex; flex-wrap: wrap; gap: 6px; }
.llw-chips span { border: 1px solid #d9c48a; background: #fffaf0; color: var(--llr-navy); border-radius: 999px; padding: 2px 11px; font-size: 12.5px; line-height: 1.6; }
.llw-chips small { color: var(--llr-soft); }

/* foreign indicators */
.llw-foreign { background: #fff; border: 1px solid var(--llr-line); border-left: 4px solid #2f6fb3; border-radius: 10px; padding: 10px 13px; }
.llw-foreign__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.llw-foreign ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; font-size: 12.8px; line-height: 1.55; }
.llw-foreign li { color: var(--llr-soft); }
.llw-foreign li.is-ok { color: var(--llr-navy); font-weight: 600; }
.llw-lvl { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.llw-lvl.is-hi { background: #dcf1e4; color: #1f6b43; }
.llw-lvl.is-mid { background: #fff1cc; color: #8a6200; }
.llw-lvl.is-lo { background: #eee8dc; color: #6b5d43; }

/* ---------------- Yogas ---------------- */
.llw-yogas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.llw-yoga { background: #fff; border: 1px solid var(--llr-line); border-top: 3px solid #2f6fb3; border-radius: 10px; padding: 9px 12px; }
.llw-yoga.is-axis { border-top-color: #7a2426; }
.llw-yoga.is-nav { border-top-color: #1f7a4c; }
.llw-yoga h3 { margin: 0 0 4px; font-size: 14.5px; line-height: 1.4; }
.llw-yoga p { margin: 0; font-size: 12.8px; line-height: 1.6; }

/* ---------------- Life areas ---------------- */
.llw-areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.llw-area { background: #fff; border: 1px solid var(--llr-line); border-radius: 10px; padding: 9px 12px; }
.llw-area__h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 3px; }
.llw-area__h b { font-size: 13.5px; line-height: 1.4; }
.llw-area p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--llr-soft) !important; }

/* ---------------- SWOT matrix ---------------- */
.llw-matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.llw-q { border-radius: 12px; padding: 10px 13px; border: 1px solid; border-top-width: 4px; }
.llw-q.is-s { background: #f1faf4; border-color: #b9dfc8; border-top-color: #1f7a4c; }
.llw-q.is-w { background: #fff8ec; border-color: #f0d6a8; border-top-color: #d8862f; }
.llw-q.is-o { background: #f0f5fd; border-color: #bdd0f0; border-top-color: #2f6fb3; }
.llw-q.is-t { background: #fdf1ef; border-color: #f0c4bc; border-top-color: #a33a2b; }
.llw-q__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.llw-q__h h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.llw-q__h h3 small { font-family: 'Noto Sans Sinhala', sans-serif; font-size: 12px; font-weight: 600; }
.llw-q__h span { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid currentColor; }
.llw-q.is-s .llw-q__h span, .llw-q.is-s h3 { color: #1f6b43 !important; }
.llw-q.is-w .llw-q__h span, .llw-q.is-w h3 { color: #9a5a12 !important; }
.llw-q.is-o .llw-q__h span, .llw-q.is-o h3 { color: #24518f !important; }
.llw-q.is-t .llw-q__h span, .llw-q.is-t h3 { color: #9b2f22 !important; }
.llw-q ul { margin: 0; padding-left: 17px; font-size: 12.8px; line-height: 1.6; }
.llw-q li { margin-bottom: 4px; }

/* ---------------- TOWS ---------------- */
.llw-towsg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.llw-tows { background: #fff; border: 1px solid var(--llr-line); border-left: 4px solid; border-radius: 10px; padding: 9px 12px; }
.llw-tows.is-so { border-left-color: #1f7a4c; }
.llw-tows.is-wo { border-left-color: #2f6fb3; }
.llw-tows.is-st { border-left-color: #a87a00; }
.llw-tows.is-wt { border-left-color: #a33a2b; }
.llw-tows h3 { margin: 0 0 4px; font-size: 14px; }
.llw-tows p { margin: 0; font-size: 12.8px; line-height: 1.6; }

/* ---------------- Timeline ---------------- */
.llw-tl { --lab: 128px; background: #fff; border: 1px solid var(--llr-line); border-radius: 12px; padding: 12px 12px 8px; }
.llw-tl__row { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 7px; }
.llw-tl__lab { flex: 0 0 var(--lab); font-size: 11.5px; font-weight: 700; color: var(--llr-navy); line-height: 1.3; }
.llw-tl__lab small { font-weight: 400; color: var(--llr-soft); font-size: 10px; }
.llw-tl__track { position: relative; flex: 1 1 auto; height: 26px; background: #f6f1e4; border-radius: 6px; }
.llw-tl__grid b { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(22, 33, 58, .09); }
.llw-seg { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); }
.llw-seg em { font-style: normal; font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: clip; padding: 0 4px; line-height: 1; }
.llw-seg.is-neu { background: #e4e9f2; color: #4b5872; }
.llw-seg.is-good { background: #bfe5cd; color: #165c37; }
.llw-seg.is-warn { background: #f7d2a8; color: #8a4a0c; }
.llw-seg.is-rahu { background: #f4c7cf; color: #8b2337; }
.llw-seg.is-ss1 { background: #e07d73; color: #fff; }
.llw-seg.is-ss12, .llw-seg.is-ss2 { background: #f2b0a7; color: #7c2016; }
.llw-seg.p-Ravi { background: #f6c8a0; color: #7a3d0c; }
.llw-seg.p-Chandra { background: #e8edf7; color: #34425e; }
.llw-seg.p-Kuja { background: #f4b3ad; color: #7a1d16; }
.llw-seg.p-Budha { background: #c3e7cf; color: #16593a; }
.llw-seg.p-Guru { background: #fbe39a; color: #6e5100; }
.llw-seg.p-Shukra { background: #e9dcf7; color: #553585; }
.llw-seg.p-Shani { background: #c7d0e6; color: #1f2e57; }
.llw-seg.p-Rahu { background: #d8cbe9; color: #4b2f73; }
.llw-seg.p-Ketu { background: #e9d6c4; color: #6b4520; }
.llw-seg.is-mahastart { box-shadow: inset 3px 0 0 #16213a, inset 0 0 0 1px rgba(255, 255, 255, .7); }
.llw-tl__now { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed #e08a00; z-index: 2; }
.llw-tl__axis { min-height: 34px; margin-bottom: 0; }
.llw-tl__axis .llw-tl__track { background: none; height: 32px; }
.llw-tl__years span { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; color: var(--llr-soft); }
.llw-tl__years span:first-child { transform: none; }
.llw-tl__years span:last-child { transform: translateX(-100%); }
.llw-tl__nowlab { position: absolute; top: 14px; transform: translateX(-50%); background: #e08a00; color: #fff; font-size: 10.5px; font-weight: 700; padding: 0 7px; border-radius: 999px; line-height: 1.6; white-space: nowrap; }

/* ---------------- Remedies ---------------- */
.llw-rem { background: #f1faf4; border: 1px solid #b9dfc8; border-left: 5px solid #1f7a4c; border-radius: 12px; padding: 11px 14px; }
.llw-rem h3 { margin: 0 0 6px; font-size: 16px; color: #1f6b43 !important; }
.llw-rem ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.65; }
.llw-rem li { margin-bottom: 4px; }

/* ---------------- A4 page tweaks ---------------- */
.llw-page .llr-page-head .llw-ph-brand { color: #a87a00; letter-spacing: .08em; font-family: Georgia, serif; font-weight: 700; }
.llw-page.is-first .llr-page-head { display: none; }
.llw-page .llw-sec { margin-top: 8px !important; }
.llw-page .llw-sec h2 { font-size: 17.5px; }
.llw-page .llw-band h1 { font-size: 24px; }
.llw-page .llw-prose p { font-size: 12.8px; line-height: 1.65; }
.llw-page .llw-q ul, .llw-page .llw-tows p, .llw-page .llw-yoga p { font-size: 12px; }
.llw-page .llw-rem ul { font-size: 12.3px; }
.llw-page .llr-table { font-size: 11.5px; }

/* ---------------- Responsive on-screen preview ---------------- */
@media (max-width: 760px) {
	.llw-flow .llw-band { flex-direction: column; align-items: flex-start; }
	.llw-flow .llw-brand { text-align: left; }
	.llw-flow .llw-tiles, .llw-flow .llw-yogas, .llw-flow .llw-areas { grid-template-columns: 1fr 1fr; }
	.llw-flow .llw-matrix, .llw-flow .llw-towsg, .llw-flow .llw-foreign ul { grid-template-columns: 1fr; }
	.llw-flow .llw-sec { flex-direction: column; align-items: flex-start; gap: 2px; }
	.llw-flow .llw-sec span { max-width: none; text-align: left; }
	.llw-flow .llw-band h1 { font-size: 21px; }
	.llw-flow .llw-tl { --lab: 74px; padding: 10px 8px 6px; overflow: hidden; }
	.llw-flow .llw-tl__lab { font-size: 10px; }
	.llw-flow .llw-seg em { font-size: 9px; padding: 0 2px; }
	.llw-flow .llw-tl__years span { font-size: 9px; }
	.llw-flow .llw-tl__years span:nth-child(even) { display: none; }
	.llw-flow .llw-houses td, .llw-flow .llw-str td, .llw-flow .llw-dates td { white-space: normal; }
	.llw-flow .llw-houses, .llw-flow .llw-str { min-width: 620px; }
}
@media (max-width: 420px) {
	.llw-flow .llw-tiles, .llw-flow .llw-yogas, .llw-flow .llw-areas { grid-template-columns: 1fr; }
}
