/* === PUBLIC SITE === */

body.site-public { overflow-y: auto; overflow-x: hidden; }

.site-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* nav */
.site-nav { position: sticky; top: 0; z-index: 100; background: #37063A; border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: none; padding: 0 24px 0 15px; }
.site-nav-logo { text-decoration: none; color: #ffffff; font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.site-nav-logo img { height: 110px; }
.site-nav-logo .logo-text { font-weight: 800; font-size: 20px; color: #ffffff; }
.site-nav-links { display: flex; align-items: center; gap: 4px; }
.site-nav-links a { color: #ccffff; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 16px; border-radius: 100px; transition: background 0.15s, color 0.15s; }
.site-nav-links a:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
.site-nav-links a.active { background: #0d2e2c; color: #c8efe9; }
.site-nav-links .cta-btn { background: #0d9488; color: #ffffff; padding: 8px 22px; margin-left: 8px; }
.site-nav-links .cta-btn:hover { background: #0ea89a; }
.site-hamburger { display: none; background: none; border: none; color: #ccffff; font-size: 24px; cursor: pointer; padding: 8px 12px; border-radius: 8px; min-width: 0; }
.site-hamburger:hover { background: rgba(255,255,255,0.08); }

/* hero */
.site-hero { padding: 80px 0 60px; }
.site-hero-inner { display: flex; align-items: center; gap: 60px; }
.site-hero-content { flex: 1; }
.site-hero-content h1 { font-size: 48px; font-weight: 900; line-height: 1.1; margin-bottom: 20px; color: #1a3a38; }
.site-hero-content .subline { font-size: 20px; line-height: 1.6; color: #2a5250; margin-bottom: 28px; max-width: 520px; }
.site-patent-badge { display: inline-block; padding: 6px 16px; background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); border-radius: 100px; color: #b8860b; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 24px; }
.site-hero-image { flex: 1; display: flex; align-items: center; justify-content: center; }
.site-hero-image img { display: block; max-width: 100%; }

/* buttons */
.site-btn { display: inline-block; padding: 14px 32px; background: #0d9488; color: #ffffff; border: none; border-radius: 100px; font-family: "Outfit", sans-serif; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.site-btn:hover { background: #0ea89a; }
.site-btn-dark { background: #0d2e2c; color: #c8efe9; }
.site-btn-dark:hover { background: #164a47; }

/* sections */
.site-section { padding: 80px 0; }
.site-section.alt { background: rgba(255,255,255,0.35); backdrop-filter: blur(8px); }
.site-section-header { text-align: center; margin-bottom: 48px; }
.site-section-header h2 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.site-section-header p { font-size: 18px; color: #5a8a86; max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* comparison */
.site-comparison { display: flex; gap: 32px; }
.site-compare-col { flex: 1; background: rgba(248,254,252,0.7); border: 1px solid rgba(13,46,44,0.1); border-radius: 18px; padding: 32px; }
.site-compare-col h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid rgba(13,46,44,0.08); }
.site-compare-col.highlighted { background: rgba(248,254,252,0.9); border-color: #0d9488; border-width: 2px; box-shadow: 0 4px 24px rgba(13,148,136,0.12); }
.site-compare-col.highlighted h3 { color: #0d9488; border-bottom-color: rgba(13,148,136,0.2); }
.site-compare-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 15px; color: #2a5250; line-height: 1.5; }
.site-compare-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; margin-top: 2px; }
.site-compare-icon.check { background: rgba(13,148,136,0.15); color: #0d9488; }
.site-compare-icon.x { background: rgba(13,46,44,0.06); color: #b8d0cc; }

/* feature cards */
.site-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.site-card { background: rgba(248,254,252,0.82); backdrop-filter: blur(12px); border: 1px solid rgba(13,46,44,0.1); border-radius: 18px; padding: 28px; transition: transform 0.18s, box-shadow 0.18s; }
.site-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(13,46,44,0.1); }
.site-card-img { width: 100%; height: 160px; background: rgba(13,46,44,0.04); border: 1px dashed rgba(13,46,44,0.12); border-radius: 12px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; color: #8aada8; font-size: 13px; overflow: hidden; }
.site-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.site-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.site-card p { font-size: 15px; color: #5a8a86; line-height: 1.6; margin-bottom: 16px; }
.site-card-link { color: #0d9488; text-decoration: none; font-weight: 600; font-size: 14px; }
.site-card-link:hover { text-decoration: underline; }

/* cta */
.site-cta { padding: 80px 0; text-align: center; }
.site-cta.alt { background: rgba(255,255,255,0.35); backdrop-filter: blur(8px); }
.site-cta h2 { font-size: 32px; font-weight: 800; margin-bottom: 20px; }
.site-cta p { color: #5a8a86; font-size: 16px; margin-top: 16px; }

/* features page */
.site-features-intro { text-align: center; padding: 60px 0 20px; }
.site-features-intro h1 { font-size: 40px; font-weight: 900; margin-bottom: 16px; }
.site-features-intro p { font-size: 18px; color: #5a8a86; max-width: 700px; margin: 0 auto; line-height: 1.7; }
.site-feature { padding: 60px 0; border-bottom: 1px solid rgba(13,46,44,0.06); scroll-margin-top: 90px; }
.site-feature:last-child { border-bottom: none; }
.site-feature-inner { display: flex; align-items: flex-start; gap: 60px; }
.site-feature.reverse .site-feature-inner { flex-direction: row-reverse; }
.site-feature-content { flex: 1; }
.site-feature > h2 { font-size: 28px; font-weight: 800; margin-bottom: 24px; }
.site-feature-content h2 { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.site-feature-content p { font-size: 16px; color: #2a5250; line-height: 1.7; margin-bottom: 14px; }
.site-feature-content ul { list-style: none; padding: 0; margin: 16px 0; }
.site-feature-content ul li { padding: 6px 0 6px 28px; position: relative; font-size: 15px; color: #2a5250; line-height: 1.6; }
.site-feature-content ul li::before { content: ''; position: absolute; left: 0; top: 12px; width: 8px; height: 8px; background: #0d9488; border-radius: 50%; }
.site-feature-image { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.site-feature-image h2 { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 20px; }
.site-feature-image img { display: block; max-width: 100%; }

/* pricing */
.site-pricing-intro { text-align: center; padding: 60px 0 40px; }
.site-pricing-intro h1 { font-size: 40px; font-weight: 900; margin-bottom: 12px; }
.site-pricing-intro p { font-size: 18px; color: #5a8a86; line-height: 1.6; }
.site-pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-bottom: 60px; }
.site-pricing-col { background: rgba(248,254,252,0.82); backdrop-filter: blur(12px); border: 1px solid rgba(13,46,44,0.1); border-radius: 18px; padding: 32px 24px; display: flex; flex-direction: column; }
.site-pricing-col.featured { border: 2px solid #0d9488; box-shadow: 0 4px 24px rgba(13,148,136,0.12); position: relative; }
.site-pricing-col.featured::before { content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #0d9488; color: #ffffff; padding: 4px 16px; border-radius: 100px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; }
.site-pricing-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.site-pricing-price { font-size: 42px; font-weight: 900; color: #1a3a38; line-height: 1; margin-bottom: 4px; }
.site-pricing-price .currency { font-size: 22px; vertical-align: top; line-height: 1.6; }
.site-pricing-period { font-size: 14px; color: #5a8a86; margin-bottom: 24px; }
.site-pricing-features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.site-pricing-features li { padding: 8px 0; font-size: 14px; color: #2a5250; border-bottom: 1px solid rgba(13,46,44,0.06); display: flex; align-items: center; gap: 8px; }
.site-pricing-features li:last-child { border-bottom: none; }
.site-pricing-features .feat-check { color: #0d9488; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.site-pricing-features .feat-x { color: #c8ddd8; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.site-pricing-note { text-align: center; padding: 40px 0 60px; }
.site-pricing-note h3 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.site-pricing-note-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 24px; max-width: 700px; margin: 0 auto; text-align: left; }
.site-pricing-note-item { font-size: 14px; color: #2a5250; padding: 6px 0 6px 24px; position: relative; }
.site-pricing-note-item::before { content: ''; position: absolute; left: 0; top: 12px; width: 8px; height: 8px; background: #0d9488; border-radius: 50%; }

/* articles */
.site-articles-intro { text-align: center; padding: 60px 0 40px; }
.site-articles-intro h1 { font-size: 40px; font-weight: 900; margin-bottom: 12px; }
.site-articles-intro p { font-size: 18px; color: #5a8a86; line-height: 1.6; }
.site-articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 60px; }
.site-articles-empty { grid-column: 1 / -1; text-align: center; padding: 80px 40px; color: #5a8a86; font-size: 18px; }

/* footer */
.site-footer { background: #0d2e2c; color: #b0ddd6; padding: 48px 0 0; }
.site-footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; padding-bottom: 32px; }
.site-footer-brand { font-size: 20px; font-weight: 800; color: #ffffff; margin-bottom: 8px; }
.site-footer .site-patent { font-size: 13px; color: #d4a32a; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.site-footer-links a { color: #b0ddd6; text-decoration: none; font-size: 15px; padding: 6px 14px; border-radius: 100px; }
.site-footer-links a:hover { color: #ffffff; background: rgba(255,255,255,0.08); }
.site-footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; font-size: 14px; color: #7aa89f; }

/* image placeholder */
.site-img-placeholder { width: 100%; min-height: 200px; background: rgba(13,46,44,0.04); border: 1px dashed rgba(13,46,44,0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #8aada8; font-size: 13px; font-weight: 500; }

/* code example */
.site-code { background: #1a2027; border-radius: 12px; padding: 24px; overflow-x: auto; font-family: "Menlo", "Monaco", "Consolas", monospace; font-size: 14px; line-height: 1.6; color: #e8f0ee; margin: 16px 0; }
.site-code .cm { color: #5a8a86; }
.site-code .kw { color: #0d9488; }
.site-code .str { color: #f59e0b; }
.site-code .ky { color: #c8efe9; }

/* focus states */
.site-nav-links a:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.site-btn:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.site-card:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.site-card-link:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.site-hamburger:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.site-compare-col:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }

/* mobile */
@media (max-width: 968px) {
	.site-pricing-grid { grid-template-columns: repeat(2, 1fr); }
	.site-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
	.site-hamburger { display: block; }
	.site-nav-links { display: none; position: absolute; top: 120px; left: 0; right: 0; background: #37063A; flex-direction: column; padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); z-index: 99; }
	.site-nav-links.open { display: flex; }
	.site-nav-links a { padding: 12px 16px; }
	.site-nav-links .cta-btn { margin-left: 0; text-align: center; margin-top: 8px; }
	.site-hero { padding: 48px 0 40px; }
	.site-hero-inner { flex-direction: column; gap: 40px; }
	.site-hero-content h1 { font-size: 34px; }
	.site-comparison { flex-direction: column; }
	.site-cards { grid-template-columns: 1fr; }
	.site-feature-inner, .site-feature.reverse .site-feature-inner { flex-direction: column; gap: 30px; }
	.site-pricing-grid { grid-template-columns: 1fr; }
	.site-pricing-col.featured::before { top: -11px; }
	.site-articles-grid { grid-template-columns: 1fr; }
	.site-footer-inner { flex-direction: column; gap: 24px; }
	.site-pricing-note-grid { grid-template-columns: 1fr; }
	.site-section { padding: 48px 0; }
	.site-section-header h2 { font-size: 28px; }
	.site-features-intro h1, .site-pricing-intro h1, .site-articles-intro h1 { font-size: 30px; }
}

/* dashboard grids */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .dash-grid { grid-template-columns: 1fr; } }

/* auth forms */
.auth-card { background: rgba(248,254,252,0.82); backdrop-filter: blur(12px); border: 1px solid rgba(13,46,44,0.1); border-radius: 18px; padding: 32px; width: 360px; box-shadow: 0 10px 30px rgba(13,46,44,0.12); }
.auth-card h1 { margin: 0 0 18px; font-size: 20px; font-weight: 600; color: #1a3a38; }
.auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="password"] { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid #b8d0cc; background: rgba(255,255,255,0.6); color: #1a3a38; font-size: 15px; font-family: inherit; margin-bottom: 10px; }
.auth-card input:focus { outline: none; border-color: #0d9488; }
.auth-card button { width: 100%; margin-top: 8px; padding: 10px; border-radius: 100px; border: none; background: #0d9488; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
.auth-card button:hover { background: #0ea89a; }
.auth-card button:focus-visible { outline: 2px solid #0d9488; outline-offset: 2px; }
.auth-err { color: #dc2626; font-size: 13px; margin-top: 10px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: #5a8a86; }
.auth-switch a { color: #0d9488; text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* === END PUBLIC SITE === */

/* AI Apps - Dashboard Interface Styles (plans 3-4) */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: "Outfit", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #1a3a38;
	background: linear-gradient(170deg, #a8deed 0%, #d4f0ec 25%, #f2faf6 50%, #fce8c8 80%, #fdd8a8 100%) fixed;
	overflow: hidden;
}

h1, h2, h3, h4 { font-family: "Outfit", sans-serif; color: #1a3a38; }

input[type="text"], input[type="number"], input[type="password"], input:not([type]), select, textarea {
	font-family: "Outfit", sans-serif;
	font-size: 16px;
	padding: 12px 16px;
	border: 1px solid #b8d0cc;
	border-radius: 12px;
	background: rgba(255,255,255,0.6);
	color: #1a3a38;
	outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #0d9488; }
textarea { resize: none; line-height: 1.6; }

button, input[type="submit"] {
	font-family: "Outfit", sans-serif;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 28px;
	border: none;
	border-radius: 100px;
	background: #0d2e2c;
	color: #c8efe9;
	cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: #164a47; }

label { display: block; font-size: 15px; font-weight: 600; color: #2a5250; margin-bottom: 6px; }

/* layout */
#app { display: flex; height: 100vh; overflow: hidden; }

#sidebar {
	width: 270px;
	background: #37063A;
	color: #ffffff;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	font-size: 16px;
	overflow: hidden;
	transition: width 0.25s ease;
}
#app.sidebar-collapsed #sidebar,
html.boot-collapsed #sidebar { width: 0; border-right: none; }

#sidebar-toggle {
	background: none;
	border: none;
	color: #ccffff;
	font-family: "Outfit", sans-serif;
	font-size: 14px;
	padding: 10px 14px;
	margin-right: 4px;
	cursor: pointer;
	border-radius: 100px;
	font-weight: 600;
}
#sidebar-toggle:hover { background: rgba(13,46,44,0.06); color: #22ffff; }
#sidebar-toggle.collapsed { /* icon swap handled in JS; class hook for any future styling */ }

.nav-badge-info { background: #0f8a5f; cursor: default; }

@media (max-width: 768px) {
	#sidebar, #sidebar-toggle { display: none; }
}

#workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; }

#topnav {
	height: 58px;
	background: #37063A;
	backdrop-filter: blur(16px);
	border-bottom: 1px solid #c8ddd8;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 28px;
	flex-shrink: 0;
}

#viewarea { flex: 1; position: relative; overflow: hidden; }

#promptbar {
	min-height: 64px;
	border-top: 1px solid #c8ddd8;
	background: rgba(248,254,252,0.85);
	backdrop-filter: blur(16px);
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

#conv-bar {
	min-height: 46px;
	border-bottom: 1px solid #c8ddd8;
	background: rgba(248,254,252,0.85);
	backdrop-filter: blur(16px);
	padding: 8px 20px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	flex-wrap: wrap;
}
#conv-filter {
	width: 110px;
	padding: 7px 10px;
	font-size: 13px;
	font-family: inherit;
	border: 1px solid #c8ddd8;
	border-radius: 6px;
	background: #ffffff;
	color: #1e3a37;
}
#conv-filter:focus { border-color: #0d9488; outline: none; }
#conv-new-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #f59e0b;
	display: inline-block;
	margin: 0 2px 0 2px;
	animation: convNewPulse 1.6s ease-in-out infinite;
	flex-shrink: 0;
}
@keyframes convNewPulse { 0%,100% { opacity: 1 } 50% { opacity: 0.35 } }
#conv-picker {
	flex: 1;
	min-width: 180px;
	padding: 7px 10px;
	font-size: 14px;
	font-family: inherit;
	border: 1px solid #c8ddd8;
	border-radius: 6px;
	background: #ffffff;
	color: #1e3a37;
}
#conv-picker optgroup { font-weight: 600; color: #0d9488; }
#conv-bar .cb-btn {
	padding: 7px 14px;
	font-size: 13px;
	font-family: inherit;
	border: 1px solid #c8ddd8;
	border-radius: 6px;
	background: #ffffff;
	color: #1e3a37;
	cursor: pointer;
}
#conv-bar .cb-btn:hover { background: #e8f5f3; border-color: #0d9488; }
#conv-meta-chip {
	margin-left: auto;
	color: #5a8a86;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	padding-left: 8px;
}
@media (max-width: 600px) {
	#conv-meta-chip { display: none; }
}

#scroll-to-bottom {
	position: absolute;
	right: 24px;
	bottom: 110px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(13,148,136,0.92);
	color: #ffffff;
	border: none;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(13,46,44,0.18);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.18s ease, visibility 0.18s ease;
	z-index: 5;
	font-size: 20px;
	font-weight: 700;
	padding: 0;
	line-height: 1;
}
#scroll-to-bottom.visible { opacity: 1; visibility: visible; }
#scroll-to-bottom:hover { background: #0d9488; }
#promptbar.focused { border-top-color: #0d9488; }
#model-select, #mic-btn, #send-btn, #cancel-btn, #autoplay-toggle { font-size: 15px; padding: 11px 24px; }
#model-select { min-width: 140px; cursor: pointer; }
#autoplay-toggle { min-width: 78px; }
#cancel-btn { background: #dc2626; color: #ffffff; }

/* memory panel (session memory editor) */
.mem-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid #c8ddd8; }
.mem-tab {
	background: none;
	border: none;
	color: #5a8a86;
	font-family: inherit;
	font-size: 14px;
	padding: 10px 18px;
	cursor: pointer;
	border-radius: 8px 8px 0 0;
	font-weight: 600;
	position: relative;
}
.mem-tab:hover { background: rgba(13,148,136,0.06); color: #0d7a70; }
.mem-tab.active { background: rgba(13,148,136,0.12); color: #0d7a70; border-bottom: 2px solid #0d9488; margin-bottom: -1px; }
.mem-tab.dirty::after { content: ' *'; color: #d97706; font-weight: 800; }
.mem-path { font-family: "Menlo", "Monaco", "Consolas", monospace; font-size: 13px; color: #5a8a86; padding: 6px 0 10px; }
.mem-editor-host { flex: 1; min-height: 240px; border: 1px solid #c8ddd8; border-radius: 6px; overflow: hidden; background: #ffffff; }
.mem-editor-host .CodeMirror { height: 100%; font-family: "Menlo", "Monaco", "Consolas", monospace; font-size: 13px; line-height: 1.55; }
.mem-actions { display: flex; gap: 10px; align-items: center; padding-top: 12px; }
.mem-actions .cb-btn { padding: 10px 20px; font-size: 14px; }
#mem-status { font-weight: 600; font-size: 14px; }
.mem-banner-warning { padding: 10px 14px; margin-bottom: 10px; background: rgba(245,158,11,0.08); border-left: 3px solid #f59e0b; border-radius: 6px; color: #8a5a00; font-size: 13px; }

/* context panel sections */
.ctx-section { margin-bottom: 14px; border: 1px solid #c8ddd8; border-radius: 8px; background: #ffffff; overflow: hidden; }
.ctx-section-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; user-select: none; background: rgba(13,148,136,0.04); }
.ctx-section-header:hover { background: rgba(13,148,136,0.08); }
.ctx-section-header .ctx-chevron { color: #0d7a70; font-size: 12px; min-width: 14px; }
.ctx-section-header .ctx-label { flex: 1; font-weight: 600; font-size: 14px; color: #1e3a37; }
.ctx-section-header .ctx-count { color: #5a8a86; font-size: 12px; font-variant-numeric: tabular-nums; }
.ctx-section-body { padding: 12px 14px; max-height: 360px; overflow-y: auto; font-family: "Menlo", "Monaco", "Consolas", monospace; font-size: 13px; line-height: 1.55; color: #2a5250; white-space: pre-wrap; word-break: break-word; background: #fcfefd; }
.ctx-section-body code { background: rgba(13,46,44,0.08); padding: 1px 4px; border-radius: 3px; }

/* per-message action bar (TTS speaker + info) */
.msg-actions { display: flex; gap: 6px; margin-top: 10px; justify-content: flex-end; }
.tts-btn, .info-btn {
	display: inline-block;
	padding: 4px 10px;
	font-size: 14px;
	line-height: 1;
	background: rgba(13,148,136,0.08);
	color: #0d7a70;
	border: 1px solid rgba(13,148,136,0.2);
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	font-family: inherit;
	min-width: 32px;
}
.tts-btn:hover, .info-btn:hover { background: rgba(13,148,136,0.16); }
.tts-btn.loading { opacity: 0.6; cursor: wait; }
.tts-btn.playing { background: #0d9488; color: #ffffff; border-color: #0d7a70; }

/* inline macro chip (expanded code from persisted turns) */
.macro-inline { margin: 8px 0; }
.macro-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: rgba(13,148,136,0.08);
	color: #0d7a70;
	border: 1px solid rgba(13,148,136,0.2);
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	vertical-align: middle;
	max-width: 100%;
	text-align: left;
}
.macro-chip:hover { background: rgba(13,148,136,0.16); }
.macro-chip.loading { opacity: 0.6; cursor: wait; }
.macro-chip.expanded .mc-chev { transform: rotate(90deg); }
.mc-icon { font-family: "Menlo", "Monaco", "Consolas", monospace; font-size: 12px; color: #0d9488; }
.mc-label { font-weight: 700; }
.mc-meta { color: #5a8a86; font-weight: 400; font-size: 12px; }
.mc-chev { transition: transform 0.15s ease; display: inline-block; font-size: 11px; }
.macro-body { margin-top: 6px; }
.macro-body pre { max-height: 600px; overflow: auto; background: rgba(13,46,44,0.06); padding: 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; font-family: "Menlo", "Monaco", "Consolas", monospace; margin: 0; white-space: pre; }
.macro-body code { background: transparent; padding: 0; font-family: inherit; font-size: inherit; }
.macro-error { padding: 10px 14px; color: #dc2626; background: rgba(220,38,38,0.06); border-radius: 6px; font-size: 13px; }

/* turn info panel rows */
.ti-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(13,46,44,0.06); }
.ti-label { min-width: 120px; color: #5a8a86; font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
.ti-value { flex: 1; color: #2a5250; font-size: 14px; word-break: break-all; }
.ti-value code { font-family: "Menlo", "Monaco", "Consolas", monospace; background: rgba(13,46,44,0.06); padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #1a3a38; }
.ti-sub { color: #5a8a86; font-size: 12px; }
.ti-status { font-weight: 600; color: #0f8a5f; font-size: 13px; }
#prompt { margin-left: 8px; }

/* views */
.view { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden; pointer-events: none; }
.view.active { opacity: 1; visibility: visible; pointer-events: auto; }

/* scrollable content areas */
.dash-scroll, .kb-scroll, .goals-scroll, .agents-scroll, .browse-content, #panel-body, #chatlog {
	flex: 1;
	overflow-y: auto;
	padding: 32px;
}

/* sidebar elements */
.sb-brand { padding: 28px 24px 6px; font-size: 26px; font-weight: 900; }
.sb-section { padding: 14px 24px; font-size: 16px; text-transform: uppercase; letter-spacing: 2px; color: #ffffff; font-weight: 700; }
.sb-feed { flex: 1; overflow-y: auto; }
.sb-entry { padding: 16px 24px; border-bottom: 1px solid #1a4240; cursor: pointer; border-left: 3px solid transparent; }
.sb-entry:hover { background: #164240; border-left-color: #6dd5cc; }
.sb-entry-title { font-size: 16px; color: #e0f4f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-entry-meta { font-size: 14px; color: #7fbfb6; margin-top: 5px; display: flex; align-items: center; gap: 10px; }
.sb-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sb-footer { padding: 18px 24px; border-top: 1px solid #1a4240; font-size: 16px; color: #b0ddd6; display: flex; justify-content: space-between; }
.sb-footer-alert { color: #f87171; font-weight: 700; cursor: pointer; }
.sb-footer-btn { font-weight: 600; cursor: pointer; padding: 4px 14px; border-radius: 6px; font-size: 13px; }
.sb-footer-btn.running { background: #0f8a5f; color: #fff; }
.sb-footer-btn.paused { background: #dc2626; color: #fff; }

/* nav tabs */
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
	background: none;
	border: none;
	color: #ccffff;
	font-family: "Outfit", sans-serif;
	font-size: 16px;
	padding: 10px 22px;
	cursor: pointer;
	border-radius: 100px;
	font-weight: 600;
	position: relative;
}
.nav-tab:hover { background: rgba(13,46,44,0.06); color: #22ffff; }
.nav-tab.active { background: #0d2e2c; color: #c8efe9; font-weight: 700; }
.nav-tab .notif-dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #ff5c00; display: none; }
.nav-tab .notif-dot.visible { display: block; }
.nav-right:empty { display: none; }
.nav-badge { background: #dc2626; color: #ffffff; padding: 4px 14px; border-radius: 100px; font-weight: 700; cursor: pointer; font-size: 14px; }
#nav-logout { color: #7aa89f; text-decoration: none; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
#nav-logout:hover { color: #c8efe9; background: rgba(13,148,136,0.15); }

/* knowledge base: pages */
.kb-page-row { background: rgba(255,255,255,0.5); border: 1px solid #c8ddd8; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.kb-page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kb-page-title { font-weight: 700; color: #1a3a38; font-size: 15px; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.kb-page-title:hover { background: rgba(13,148,136,0.1); }
.kb-page-count { color: #5a8a86; font-size: 13px; }
.kb-page-link { color: #0d9488; font-size: 13px; margin-left: auto; text-decoration: none; }
.kb-page-link:hover { text-decoration: underline; }
.kb-page-link.kb-page-danger { color: #dc2626; margin-left: 6px; }
.kb-page-desc { color: #5a8a86; font-size: 13px; margin-top: 4px; font-style: italic; cursor: pointer; }
.kb-page-desc:hover { color: #2a5250; }
.kb-page-chunks { margin-top: 10px; border-top: 1px dashed #c8ddd8; padding-top: 10px; }
.kb-chunk { background: rgba(255,255,255,0.8); border: 1px solid #d9e5e2; border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.kb-chunk-text { font-size: 13px; color: #2a5250; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; }
.kb-chunk-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: #5a8a86; gap: 10px; }
.kb-chunk-meta a { color: #0d9488; text-decoration: none; }

/* prompt bar */
#prompt { flex: 1; background: none; border: none; color: #1a3a38; font-size: 16px; padding: 8px 0; resize: none; outline: none; max-height: 150px; }
#prompt::placeholder { color: #8aada8; }

/* card - one class for all card-like containers */
.card {
	background: rgba(248,254,252,0.82);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(13,46,44,0.1);
	border-radius: 18px;
	padding: 28px;
	margin-bottom: 20px;
	box-shadow: 0 2px 16px rgba(13,46,44,0.06);
}

/* chat messages */
.msg { padding: 12px 0; white-space: pre-wrap; word-wrap: break-word; line-height: 1.7; }

/* markdown rendered inside assistant messages */
#chatlog .msg-ai p { margin: 0 0 10px; }
#chatlog .msg-ai p:last-child { margin-bottom: 0; }
#chatlog .md-h1 { font-size: 22px; font-weight: 800; margin: 14px 0 8px; line-height: 1.3; color: #1a3a38; }
#chatlog .md-h2 { font-size: 19px; font-weight: 800; margin: 12px 0 6px; line-height: 1.3; color: #1a3a38; }
#chatlog .md-h3 { font-size: 17px; font-weight: 700; margin: 10px 0 5px; line-height: 1.35; color: #1a3a38; }
#chatlog .md-h4 { font-size: 15px; font-weight: 700; margin: 8px 0 4px; line-height: 1.4; color: #2a5250; text-transform: uppercase; letter-spacing: 0.6px; }
#chatlog .md-list { margin: 8px 0; padding-left: 24px; }
#chatlog .md-list li { margin: 2px 0; }
#chatlog .md-bq { margin: 8px 0; padding: 6px 14px; border-left: 3px solid #c8ddd8; background: rgba(13,148,136,0.04); color: #2a5250; border-radius: 0 6px 6px 0; }
#chatlog .md-bq + .md-bq { margin-top: 0; }
#chatlog .md-hr { border: 0; border-top: 1px solid #c8ddd8; margin: 14px 0; }
#chatlog .md-table { border-collapse: collapse; margin: 10px 0; font-size: 14px; }
#chatlog .md-table th, #chatlog .md-table td { border: 1px solid #c8ddd8; padding: 6px 10px; text-align: left; vertical-align: top; }
#chatlog .md-table th { background: rgba(13,148,136,0.08); font-weight: 700; color: #1a3a38; }
.tp-members { margin-bottom: 14px; padding: 10px 14px; background: #ffffff; border: 1px solid #c8ddd8; border-radius: 8px; }
.tp-members-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: #5a8a86; font-weight: 700; margin-bottom: 6px; }
.tp-members-row { padding: 4px 0; font-size: 13px; color: #2a5250; display: flex; justify-content: space-between; gap: 10px; }
.tp-members-link { color: #0d7a70; cursor: pointer; text-decoration: none; }
.tp-members-link:hover { text-decoration: underline; }
.tp-members-count { color: #5a8a86; font-variant-numeric: tabular-nums; }
.msg-human { border-left: 3px solid #0d9488; padding: 16px 22px; margin: 6px 0; background: rgba(13,148,136,0.05); border-radius: 0 14px 14px 0; }
.msg-human .prefix { color: #0d9488; font-weight: 700; }
.msg-human .msg-time { color: #5a8a86; font-size: 13px; float: right; }
.msg-ai { padding: 14px 22px; border-left: 3px solid #c8ddd8; margin: 6px 0; border-radius: 0 14px 14px 0; background: rgba(255,255,255,0.3); }
.msg-system { color: #5a8a86; font-style: italic; padding-left: 22px; }
.msg-thinking { color: #0d9488; font-size: 18px; padding-left: 22px; font-weight: 600; }
.msg-thinking::after { content: ''; display: inline-block; width: 10px; height: 20px; background: #0d9488; margin-left: 4px; animation: blink 1s step-end infinite; vertical-align: text-bottom; }
@keyframes blink { 50% { opacity: 0; } }

/* agent panels */
.agent-panel { display: flex; flex-direction: column; overflow: hidden; min-height: 340px; max-height: 540px; }
.agent-panel.running { border-left: 5px solid #0f8a5f; }
.agent-panel.completed { border-left: 5px solid #2563eb; }
.agent-header { padding: 18px 26px; border-bottom: 1px solid rgba(13,46,44,0.08); display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.3); }
.agent-label { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.agent-meta { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.agent-time { color: #5a8a86; }
.agent-output { flex: 1; overflow-y: auto; padding: 20px 26px; color: #2a5250; white-space: pre-wrap; word-wrap: break-word; line-height: 1.7; }
.agent-step { color: #0d9488; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 10px 0 5px; border-top: 1px solid rgba(13,46,44,0.08); margin-top: 10px; }
.agent-step:first-child { border-top: none; margin-top: 0; }
.agents-grid { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.agent-status-text { font-weight: 600; }

/* browse/logs split view */
.browse-split { display: flex; flex: 1; overflow: hidden; }
.browse-list { width: 270px; border-right: 1px solid rgba(13,46,44,0.1); overflow-y: auto; padding: 16px 0; background: rgba(255,255,255,0.3); }
.browse-item { padding: 16px 26px; color: #2a5250; cursor: pointer; font-size: 16px; border-left: 3px solid transparent; }
.browse-item:hover { background: rgba(13,46,44,0.04); }
.browse-item.active { color: #0d7a70; border-left-color: #0d9488; background: rgba(13,148,136,0.06); font-weight: 600; }

/* slide panel */
#panel-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 30; visibility: hidden; pointer-events: none; background: rgba(13,46,44,0); transition: all 0.25s; }
#panel-backdrop.visible { visibility: visible; pointer-events: auto; background: rgba(13,46,44,0.25); backdrop-filter: blur(4px); }
#panel { position: fixed; top: 0; right: 0; width: 50%; height: 100%; background: #f2faf6; border-left: 1px solid rgba(13,46,44,0.1); z-index: 31; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s ease; }
#panel.visible { transform: translateX(0); }
#panel-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; border-bottom: 1px solid rgba(13,46,44,0.1); }
#panel-title { font-size: 22px; font-weight: 700; }
#panel-close { background: none; border: none; color: #5a8a86; font-size: 26px; cursor: pointer; padding: 4px 12px; border-radius: 8px; }
#panel-close:hover { color: #dc2626; background: none; }

/* file lists in panels */
.file-list { list-style: none; }
.file-list li { padding: 14px 26px; color: #2a5250; cursor: pointer; font-size: 16px; border-left: 3px solid transparent; }
.file-list li:hover { background: rgba(13,46,44,0.04); }
.file-list li.active { color: #0d7a70; border-left-color: #0d9488; }

/* shared utility */
.placeholder { color: #5a8a86; padding: 60px; text-align: center; font-size: 18px; }
.btn-danger { background: none; border: 1px solid #dc2626; color: #dc2626; padding: 8px 16px; font-size: 14px; }
.btn-danger:hover { background: rgba(220,38,38,0.06); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* === FILES TAB === */
.fb-layout { display: flex; flex: 1; overflow: hidden; }
.fb-nav { width: 360px; min-width: 360px; border-right: 1px solid rgba(13,46,44,0.1); display: flex; flex-direction: column; background: rgba(255,255,255,0.4); position: relative; transition: min-width 0.15s ease; }
.fb-nav.collapsed { flex: 0 0 0; width: 0; min-width: 0; overflow: hidden; border-right: none; padding: 0; }
.fb-navlink-hide { color: #8aada8; font-weight: 500; font-size: 13px; }
.fb-nav-expand { flex: 0 0 28px; min-width: 28px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.4); border: none; border-right: 1px solid rgba(13,46,44,0.1); cursor: pointer; color: #5a8a86; font-size: 14px; writing-mode: vertical-lr; padding: 0; }
.fb-nav-expand:hover { background: rgba(13,46,44,0.04); color: #1a3a38; }
.fb-viewer { flex: 1; display: flex; flex-direction: column; overflow: hidden; transition: opacity 0.18s ease; min-width: 0; }
.fb-viewer.fading { opacity: 0; }

.fb-crumbs { padding: 14px 18px; border-bottom: 1px solid rgba(13,46,44,0.08); font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 50px; }
.fb-crumb { color: #0d7a70; cursor: pointer; padding: 4px 8px; border-radius: 8px; font-weight: 600; }
.fb-crumb:hover { background: rgba(13,148,136,0.08); }
.fb-crumb.terminal { color: #2a5250; cursor: default; }
.fb-crumb.terminal:hover { background: none; }
.fb-crumb-sep { color: #b8d0cc; font-weight: 700; }

.fb-nav-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px; border-bottom: 1px solid rgba(13,46,44,0.08); min-height: 38px; }
.fb-navlink { color: #0d7a70; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 10px; border-radius: 8px; }
.fb-navlink:hover { background: rgba(13,148,136,0.08); color: #0d5a56; }
.fb-navlink.active { background: rgba(13,148,136,0.12); color: #0d7a70; }

.fb-toolbar { padding: 12px 16px; border-bottom: 1px solid rgba(13,46,44,0.08); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fb-toolbar input[type="text"] { flex: 1; min-width: 120px; padding: 8px 12px; font-size: 14px; }
.fb-toolbar select { padding: 8px 10px; font-size: 14px; }
.fb-toolbar button { padding: 8px 14px; font-size: 13px; font-weight: 600; }
.fb-toolbar .fb-iconbtn { background: rgba(13,46,44,0.06); color: #2a5250; min-width: 36px; padding: 8px 10px; }
.fb-toolbar .fb-iconbtn:hover { background: rgba(13,46,44,0.12); }

.fb-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.fb-group-header { font-size: 12px; text-transform: uppercase; letter-spacing: 1.6px; padding: 14px 18px 6px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.fb-group-header::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.fb-group-recent .fb-group-header::before { background: #f59e0b; }
.fb-group-recent .fb-group-header { color: #d97706; }
.fb-group-recent { border-bottom: 1px solid rgba(13,46,44,0.06); padding-bottom: 6px; margin-bottom: 4px; }

.fb-row { display: flex; align-items: center; gap: 10px; padding: 9px 18px; cursor: pointer; border-left: 3px solid transparent; font-size: 15px; color: #2a5250; transition: background 0.1s; }
.fb-row:hover { background: rgba(13,46,44,0.04); }
.fb-row.active { background: rgba(13,148,136,0.08); border-left-color: #0d9488; color: #0d7a70; font-weight: 600; }
.fb-row.unwritable { opacity: 0.85; }
.fb-row-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-row-meta { font-size: 12px; color: #8aada8; flex-shrink: 0; }
.fb-row.active .fb-row-meta { color: #0d9488; }

.fb-chip { display: inline-block; min-width: 38px; padding: 3px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; text-align: center; letter-spacing: 0.6px; color: #ffffff; flex-shrink: 0; font-family: "Outfit", sans-serif; }
.fb-chip-dir { background: #d4a32a; }
.fb-chip-ro { background: #5a8a86; }
.fb-chip-link { background: #0d9488; }
.fb-chip-code { background: #0f8a5f; }
.fb-chip-web { background: #c0392b; }
.fb-chip-data { background: #7c3aed; }
.fb-chip-doc { background: #2563eb; }
.fb-chip-img { background: #e67e22; }
.fb-chip-cfg { background: #5a8a86; }
.fb-chip-bin { background: #4a4a4a; }
.fb-chip-text { background: #94a3b8; }

.fb-empty { padding: 80px 32px; text-align: center; color: #5a8a86; }
.fb-empty-icon { width: 64px; height: 50px; margin: 0 auto 20px; background: rgba(13,46,44,0.08); border-radius: 4px 8px 8px 8px; position: relative; }
.fb-empty-icon::before { content: ''; position: absolute; left: 0; top: -8px; width: 28px; height: 12px; background: rgba(13,46,44,0.08); border-radius: 4px 4px 0 0; }
.fb-empty p { margin-top: 8px; font-size: 16px; }

.fb-editor-head { padding: 14px 22px; border-bottom: 1px solid rgba(13,46,44,0.08); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 60px; background: rgba(255,255,255,0.5); }
.fb-editor-name { font-weight: 700; font-size: 17px; color: #1a3a38; flex-shrink: 0; }
.fb-editor-meta { font-size: 13px; color: #5a8a86; }
.fb-editor-meta b { color: #2a5250; font-weight: 600; }
.fb-editor-actions { margin-left: auto; display: flex; gap: 8px; }
.fb-editor-actions button { padding: 8px 18px; font-size: 13px; font-weight: 600; }
.fb-editor-msg { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.fb-editor-msg.dirty { color: #d97706; background: rgba(217,119,6,0.1); }
.fb-editor-msg.saved { color: #0f8a5f; background: rgba(15,138,95,0.1); }
.fb-editor-msg.error { color: #dc2626; background: rgba(220,38,38,0.1); }

.fb-editor-body { flex: 1; overflow: hidden; position: relative; }
.fb-editor-body .CodeMirror { height: 100%; font-family: "Menlo", "Monaco", "Consolas", monospace; font-size: 14px; line-height: 1.55; }

.fb-image-pane { flex: 1; overflow: auto; padding: 28px; display: flex; align-items: center; justify-content: center; background-color: #f0f0f0; background-image: linear-gradient(45deg, #c8c8c8 25%, transparent 25%), linear-gradient(-45deg, #c8c8c8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #c8c8c8 75%), linear-gradient(-45deg, transparent 75%, #c8c8c8 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, 10px 0; }
.fb-image-pane img { max-width: 100%; max-height: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.2); border-radius: 4px; transition: transform 0.18s; transform-origin: center; }
.fb-image-controls { position: absolute; bottom: 18px; right: 18px; display: flex; gap: 6px; background: rgba(255,255,255,0.95); padding: 6px; border-radius: 100px; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.fb-image-controls button { padding: 6px 14px; font-size: 13px; min-width: 36px; }

.fb-modal-bg { position: fixed; inset: 0; background: rgba(13,46,44,0.4); backdrop-filter: blur(4px); z-index: 50; display: flex; align-items: center; justify-content: center; }
.fb-modal { background: #f8fefc; border-radius: 18px; padding: 28px 32px; min-width: 380px; max-width: 90vw; box-shadow: 0 10px 40px rgba(13,46,44,0.25); }
.fb-modal h3 { margin-bottom: 16px; font-size: 19px; }
.fb-modal input { width: 100%; margin-bottom: 18px; }
.fb-modal-buttons { display: flex; gap: 10px; justify-content: flex-end; }
.fb-modal-buttons .btn-cancel { background: rgba(13,46,44,0.08); color: #2a5250; }
.fb-modal-buttons .btn-cancel:hover { background: rgba(13,46,44,0.16); }

.fb-paging { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-top: 1px solid rgba(13,46,44,0.08); margin-top: 4px; font-size: 13px; color: #2a5250; }
.fb-paging button { padding: 6px 14px; font-size: 13px; }

.fb-json-tree { padding: 16px 20px; font-size: 14px; font-family: "Menlo", "Monaco", "Consolas", monospace; line-height: 1.6; overflow-y: auto; height: 100%; }
.fj-object, .fj-array { margin-left: 20px; border-left: 1px solid rgba(13,46,44,0.1); padding-left: 12px; }
.fj-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; flex-wrap: wrap; }
.fj-key { color: #0d7a70; font-weight: 700; flex-shrink: 0; min-width: 40px; }
.fj-value { flex: 1; min-width: 0; }
.fj-toggle { cursor: pointer; color: #5a8a86; font-size: 12px; font-weight: 700; user-select: none; padding: 0 4px; }
.fj-toggle:hover { color: #0d9488; }
.fj-str { font-family: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid #c8ddd8; border-radius: 6px; width: 100%; max-width: 400px; background: rgba(255,255,255,0.8); }
.fj-str:focus { border-color: #0d9488; outline: none; }
.fj-num { font-family: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid #c8ddd8; border-radius: 6px; width: 100px; background: rgba(255,255,255,0.8); }
.fj-num:focus { border-color: #0d9488; outline: none; }
.fj-bool { color: #7c3aed; font-weight: 700; cursor: pointer; padding: 2px 8px; border-radius: 4px; display: inline-block; }
.fj-bool:hover { background: rgba(124,58,237,0.08); }
.fj-null { color: #5a8a86; font-style: italic; cursor: pointer; padding: 2px 8px; border-radius: 4px; display: inline-block; }
.fj-null:hover { background: rgba(90,138,134,0.08); }
.fj-addbtn { margin-left: 8px; padding: 2px 10px; font-size: 12px; }
.fj-rmbtn { flex-shrink: 0; padding: 2px 8px; font-size: 11px; }

button:disabled, button[disabled] { opacity: 0.45; cursor: not-allowed; }
button:disabled:hover, button[disabled]:hover { background: #0d2e2c; }

/* docs page */
.site-docs-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; justify-content: center; }
.site-docs-nav a { background: rgba(13,46,44,0.08); color: #1a3a38; padding: 6px 16px; border-radius: 100px; font-size: 14px; font-weight: 500; text-decoration: none; transition: background 0.2s; }
.site-docs-nav a:hover { background: rgba(13,148,136,0.15); color: #0d9488; }
.site-docs { padding-bottom: 60px; }
.site-docs-section { padding: 40px 0 20px; border-bottom: 1px solid rgba(13,46,44,0.08); }
.site-docs-section:last-child { border-bottom: none; }
.site-docs-section h2 { font-size: 28px; font-weight: 800; margin: 0 0 12px; color: #1a3a38; }
.site-docs-section h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; color: #1a3a38; }
.site-docs-section p { font-size: 16px; line-height: 1.7; color: #2a5250; margin: 0 0 14px; }
.site-docs-section ul { margin: 0 0 14px; padding-left: 24px; }
.site-docs-section li { font-size: 15px; line-height: 1.7; color: #2a5250; margin-bottom: 6px; }
.site-docs-section code { background: rgba(13,46,44,0.07); padding: 2px 6px; border-radius: 4px; font-family: "Menlo","Monaco","Consolas",monospace; font-size: 14px; color: #1a3a38; }
.site-docs-section pre { background: #1a2027; border-radius: 12px; padding: 20px 24px; overflow-x: auto; margin: 14px 0 18px; }
.site-docs-section pre code { background: none; padding: 0; color: #e8f0ee; font-size: 13.5px; line-height: 1.6; }
.site-docs-tools { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0 18px; }
.site-docs-tool { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; background: rgba(13,46,44,0.03); border-radius: 10px; }
.site-docs-tool strong { color: #0d9488; font-family: "Menlo","Monaco","Consolas",monospace; font-size: 14px; flex-shrink: 0; min-width: 70px; }
.site-docs-tool span { font-size: 15px; color: #2a5250; line-height: 1.5; }
.site-docs-table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 15px; }
.site-docs-table th { text-align: left; padding: 10px 14px; background: rgba(13,46,44,0.05); color: #1a3a38; font-weight: 600; border-bottom: 2px solid rgba(13,46,44,0.1); }
.site-docs-table td { padding: 10px 14px; border-bottom: 1px solid rgba(13,46,44,0.06); color: #2a5250; }
.site-docs-table td:first-child { font-weight: 600; color: #0d9488; font-family: "Menlo","Monaco","Consolas",monospace; font-size: 13px; width: 70px; }
.site-docs-table td:nth-child(2) { font-family: "Menlo","Monaco","Consolas",monospace; font-size: 13px; color: #1a3a38; }

/* articles page sections */
.site-articles-section { padding: 20px 0 30px; }
.site-articles-section h2 { font-size: 24px; font-weight: 800; margin: 0 0 16px; color: #1a3a38; }
.site-articles-grid-3 { grid-template-columns: repeat(3, 1fr); }
.site-article-card { display: block; padding: 20px 24px; background: rgba(248,254,252,0.7); border: 1px solid rgba(13,46,44,0.08); border-radius: 14px; text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s; }
.site-article-card:hover { border-color: rgba(13,148,136,0.25); box-shadow: 0 4px 16px rgba(13,46,44,0.08); }
.site-article-card h3 { font-size: 17px; font-weight: 700; color: #1a3a38; margin: 0 0 6px; }
.site-article-card p { font-size: 14px; color: #5a8a86; line-height: 1.5; margin: 0; }

/* link request form */
.site-link-form { max-width: 640px; margin-top: 16px; }
.site-link-form-row { display: flex; gap: 12px; margin-bottom: 10px; }
.site-link-form-row input { flex: 1; }
.site-link-form input[type="text"],
.site-link-form input[type="email"],
.site-link-form input[type="url"] { box-sizing: border-box; padding: 10px 14px; border-radius: 12px; border: 1px solid #b8d0cc; background: rgba(255,255,255,0.6); color: #1a3a38; font-size: 15px; font-family: inherit; }
.site-link-form input:focus { outline: none; border-color: #0d9488; }
.site-link-msg { padding: 10px 16px; border-radius: 10px; font-size: 15px; margin-bottom: 14px; }
.site-link-msg-ok { background: rgba(13,148,136,0.1); color: #0d7a70; }
.site-link-msg-err { background: rgba(220,38,38,0.08); color: #b91c1c; }

@media (max-width: 768px) {
	.site-docs-nav { gap: 8px; }
	.site-docs-section h2 { font-size: 22px; }
	.site-docs-section pre { padding: 14px 16px; }
	.site-docs-table { font-size: 13px; }
	.site-docs-table th, .site-docs-table td { padding: 8px 10px; }
	.site-articles-grid-3 { grid-template-columns: 1fr; }
	.site-link-form-row { flex-direction: column; gap: 10px; }
}

