/*
 * BulletPlan app — "Dark Luxury + neon glass" design system (Stitch
 * design "BulletPlan Intelligence"): obsidian background, layered
 * surfaces with hairline violet borders, violet→indigo primary gradient,
 * emerald mint for completion, warm amber for tokens and priorities,
 * monospace numerals. RTL first (Vazirmatn), LTR for English/Turkish.
 * No backdrop-filter (it stalls some GPUs); depth comes from gradients,
 * borders and soft glows instead.
 */

:root {
	--bg: #0b0f19;
	--bg-2: #0f131d;
	--s1: #141826;
	--s2: #1a1e2b;
	--s3: #232838;
	--s4: #2d3345;
	--line: rgba(255, 255, 255, 0.07);
	--line-2: rgba(192, 193, 255, 0.16);
	--text: #e3e5f3;
	--text-2: #c7c4d7;
	--muted: #8f91a8;
	--primary: #c0c1ff;
	--primary-2: #8083ff;
	--violet: #8b5cf6;
	--indigo: #6366f1;
	--grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	--grad-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.08));
	--mint: #4edea3;
	--mint-2: #10b981;
	--mint-soft: rgba(78, 222, 163, 0.12);
	--amber: #ffb95f;
	--amber-2: #f59e0b;
	--amber-soft: rgba(245, 158, 11, 0.12);
	--danger: #ffb4ab;
	--danger-2: #ef4444;
	--danger-soft: rgba(239, 68, 68, 0.12);
	--radius: 16px;
	--radius-sm: 10px;
	--radius-xs: 7px;
	--shadow: 0 10px 34px rgba(0, 0, 0, 0.38);
	--glow: 0 0 0 1px rgba(99, 102, 241, 0.35), 0 0 26px rgba(99, 102, 241, 0.28);
	--font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Vazirmatn", system-ui, sans-serif;
	--mono: "JetBrains Mono", "Vazirmatn", ui-monospace, monospace;
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	color-scheme: dark;
}

html[dir="ltr"] {
	--font-head: "Space Grotesk", "Vazirmatn", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.bp-body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(900px 520px at 88% -8%, rgba(99, 102, 241, 0.16), transparent 60%),
		radial-gradient(700px 480px at -10% 105%, rgba(16, 185, 129, 0.09), transparent 60%),
		var(--bg);
	background-attachment: fixed;
	color: var(--text);
	font: 400 15px/1.75 var(--font);
	-webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 8px; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.4rem, 1.05rem + 1.5vw, 2rem); font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 10px; }
.num, .mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; border-radius: 6px; }

.material-symbols-rounded {
	font-family: "Material Symbols Rounded";
	font-weight: 400;
	font-style: normal;
	font-size: 20px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	direction: ltr;
	-webkit-font-feature-settings: "liga";
	font-feature-settings: "liga";
	user-select: none;
	flex: none;
}
.ic-fill { font-variation-settings: "FILL" 1; }

/* ------------------------------------------------------------------ */
/* Shell                                                               */
/* ------------------------------------------------------------------ */

.bp-app { min-height: 100vh; display: flex; flex-direction: column; }
.bp-splash { flex: 1; display: grid; place-items: center; }
.bp-logo-mark {
	width: 44px; height: 44px; border-radius: 13px;
	background: var(--grad);
	box-shadow: var(--glow);
	position: relative;
	animation: bp-pulse 1.4s var(--ease) infinite;
}
.bp-logo-mark::before, .bp-logo-mark::after {
	content: ""; position: absolute; inset-inline-start: 11px; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.9);
}
.bp-logo-mark::before { top: 15px; width: 22px; box-shadow: 0 7px 0 rgba(255,255,255,0.7), 0 14px 0 rgba(255,255,255,0.5); }
.bp-logo-mark::after { top: 14px; width: 5px; height: 5px; inset-inline-start: 5px; border-radius: 50%; box-shadow: 0 7px 0 #fff, 0 14px 0 #fff; }
@keyframes bp-pulse { 50% { transform: scale(0.94); opacity: 0.8; } }

.topbar {
	position: sticky; top: 0; z-index: 40;
	display: flex; align-items: center; gap: 14px;
	padding: 12px clamp(14px, 3vw, 28px);
	background: linear-gradient(180deg, rgba(11, 15, 25, 0.96), rgba(11, 15, 25, 0.86));
	border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-family: var(--font-head); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .bp-logo-mark { width: 34px; height: 34px; border-radius: 10px; animation: none; }
.brand .bp-logo-mark::before { top: 11px; inset-inline-start: 9px; width: 17px; box-shadow: 0 5px 0 rgba(255,255,255,0.7), 0 10px 0 rgba(255,255,255,0.5); height: 2.5px; }
.brand .bp-logo-mark::after { top: 10px; inset-inline-start: 4px; width: 4px; height: 4px; box-shadow: 0 5px 0 #fff, 0 10px 0 #fff; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); font-family: var(--font); }

.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a {
	display: flex; align-items: center; gap: 7px;
	padding: 8px 14px; border-radius: 11px;
	color: var(--text-2); font-size: 14px; font-weight: 600;
	transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: var(--s2); color: var(--text); text-decoration: none; }
.nav a.is-active { background: var(--primary); color: #1d1a6b; box-shadow: 0 6px 22px rgba(128, 131, 255, 0.35); }

.top-actions { display: flex; align-items: center; gap: 8px; }
.token-pill {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; border-radius: 999px;
	background: var(--amber-soft); border: 1px solid rgba(245, 158, 11, 0.25);
	color: var(--amber); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.token-pill:hover { text-decoration: none; border-color: rgba(245, 158, 11, 0.5); }
.token-pill .num { font-weight: 700; }
.icon-btn {
	position: relative; width: 38px; height: 38px; border-radius: 12px;
	display: grid; place-items: center;
	background: var(--s2); border: 1px solid var(--line); color: var(--text-2);
	transition: border-color 0.2s, color 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); text-decoration: none; }
.icon-btn .dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--s2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; border: 0; }

.main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 28px) 110px; }
.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 12px 90px; }

.bottom-nav { display: none; }

@media (max-width: 860px) {
	.nav { display: none; }
	.brand small { display: none; }
	.bottom-nav {
		display: grid; grid-template-columns: repeat(5, 1fr);
		position: fixed; bottom: 0; inset-inline: 0; z-index: 50;
		padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
		background: rgba(15, 19, 29, 0.97); border-top: 1px solid var(--line);
	}
	.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; }
	.bottom-nav a:hover { text-decoration: none; }
	.bottom-nav a.is-active { color: var(--primary); background: rgba(192, 193, 255, 0.08); }
	.bottom-nav .material-symbols-rounded { font-size: 22px; }
	.token-pill .lbl { display: none; }
}

/* ------------------------------------------------------------------ */
/* Primitives                                                          */
/* ------------------------------------------------------------------ */

.card {
	position: relative;
	background: linear-gradient(180deg, rgba(26, 30, 43, 0.92), rgba(20, 24, 38, 0.92));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(16px, 2.2vw, 22px);
	box-shadow: var(--shadow);
}
.card::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	background: linear-gradient(115deg, rgba(99, 102, 241, 0.16), transparent 38%);
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	padding: 1px;
}
.card--hero { background: radial-gradient(640px 240px at 100% 0, rgba(99, 102, 241, 0.2), transparent 70%), linear-gradient(180deg, rgba(26, 30, 43, 0.95), rgba(20, 24, 38, 0.95)); }
.card--flat { box-shadow: none; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.card-head > .spacer { flex: 1; }
.head-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--grad-soft); border: 1px solid var(--line-2); color: var(--primary); }
.head-icon.mint { background: var(--mint-soft); border-color: rgba(78, 222, 163, 0.25); color: var(--mint); }
.head-icon.amber { background: var(--amber-soft); border-color: rgba(245, 158, 11, 0.25); color: var(--amber); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.85fr); align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dash-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .grid-2, .grid-3, .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.gap-s { gap: 6px; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 9px 18px;
	border-radius: 12px; border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.05); color: var(--text);
	font-weight: 700; font-size: 14px; white-space: nowrap;
	transition: transform 0.15s var(--ease), box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn:hover { text-decoration: none; border-color: var(--line-2); background: rgba(255, 255, 255, 0.08); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); border-color: rgba(192, 193, 255, 0.35); color: #fff; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
.btn-primary:hover { background: var(--grad); box-shadow: var(--glow), 0 8px 24px rgba(99, 102, 241, 0.35); border-color: rgba(192, 193, 255, 0.6); }
.btn-soft { background: rgba(192, 193, 255, 0.1); border-color: var(--line-2); color: var(--primary); }
.btn-mint { background: var(--mint-2); border-color: transparent; color: #03281b; }
.btn-mint:hover { background: var(--mint); }
.btn-danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.3); background: var(--danger-soft); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 12px; border-radius: 999px;
	background: var(--s3); border: 1px solid var(--line);
	color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip .material-symbols-rounded { font-size: 16px; }
.chip.violet { background: rgba(99, 102, 241, 0.14); border-color: var(--line-2); color: var(--primary); }
.chip.mint { background: var(--mint-soft); border-color: rgba(78, 222, 163, 0.25); color: var(--mint); }
.chip.amber { background: var(--amber-soft); border-color: rgba(245, 158, 11, 0.25); color: var(--amber); }
.chip.red { background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.3); color: var(--danger); }
.chip.topic-chip { --c: #c0c1ff; color: var(--c); border-color: color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); padding-block: 2px; font-size: 12px; }
.chip.topic-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.lock-ic { font-size: 14px !important; vertical-align: -2px; color: var(--muted); }
.day-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.day-grid.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .day-grid { grid-template-columns: minmax(0, 1fr); } }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--line-2); color: var(--text); }
button.chip.is-on { background: var(--primary); color: #1d1a6b; border-color: transparent; }

.bar { height: 7px; border-radius: 99px; background: var(--s4); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--primary-2)); transition: width 0.6s var(--ease); }
html[dir="rtl"] .bar > span { background: linear-gradient(270deg, var(--mint), var(--primary-2)); margin-inline-start: 0; }
.bar.amber > span { background: linear-gradient(90deg, var(--amber-2), var(--amber)); }

.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--s4); }
.ring .val { stroke: url(#bp-ring-grad); stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 17px var(--mono); }

.stat { display: grid; gap: 2px; }
.stat b { font: 700 1.5rem/1.2 var(--mono); }
.stat span { color: var(--muted); font-size: 12.5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stats .stat { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.tabs button:hover { color: var(--text); background: var(--s2); }
.tabs button.is-active { background: var(--s3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.empty { text-align: center; padding: clamp(28px, 6vw, 60px) 18px; }
.empty .head-icon { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; }
.empty .head-icon .material-symbols-rounded { font-size: 32px; }
.empty p { color: var(--text-2); max-width: 520px; margin-inline: auto; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); font-size: 13.5px; }
.notice.warn { background: var(--amber-soft); border-color: rgba(245, 158, 11, 0.3); color: #ffd9a8; }
.notice.bad { background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.35); color: #ffd1cc; }
.notice.ok { background: var(--mint-soft); border-color: rgba(78, 222, 163, 0.3); color: #c6f7e1; }
.notice .material-symbols-rounded { margin-top: 2px; }

/* ------------------------------------------------------------------ */
/* Forms                                                               */
/* ------------------------------------------------------------------ */

.field { display: grid; gap: 6px; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--amber); margin-inline-start: 3px; }
.field .hint { font-size: 12px; color: var(--muted); }
.field.has-error .input, .field.has-error .options { border-color: rgba(239, 68, 68, 0.6); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
.field.has-error .err { display: block; }
.field .err { display: none; font-size: 12px; color: var(--danger); }
.input {
	width: 100%; min-height: 44px; padding: 10px 13px;
	border-radius: 12px; border: 1px solid rgba(144, 143, 160, 0.25);
	background: rgba(15, 23, 42, 0.6); color: var(--text);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: #6d6f86; }
.input:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18); }
textarea.input { min-height: 92px; resize: vertical; line-height: 1.7; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(0% + 13px) 50%, calc(0% + 18px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 32px; }
html[dir="ltr"] select.input { background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; padding-inline-start: 13px; padding-inline-end: 32px; }
.input-unit { position: relative; }
.input-unit .unit { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font: 500 12px var(--mono); pointer-events: none; }
.input-unit .input { padding-inline-end: 52px; }
.input[type="number"], .input[type="date"], .input[type="time"] { font-family: var(--mono); }
.options { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px; border-radius: 12px; border: 1px solid transparent; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.opt span:hover { border-color: var(--line-2); color: var(--text); }
.opt input:checked + span { background: rgba(99, 102, 241, 0.2); border-color: var(--primary-2); color: #fff; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.opt input:focus-visible + span { outline: 2px solid var(--primary-2); outline-offset: 2px; }
.scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.scale .opt span { justify-content: center; padding: 8px 0; width: 100%; font-family: var(--mono); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: var(--s4); position: relative; transition: background 0.2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.switch input:checked + i { background: var(--mint-2); }
.switch input:checked + i::after { transform: translateX(18px); }
html[dir="rtl"] .switch input:checked + i::after { transform: translateX(-18px); }

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.hero .greet { flex: 1; min-width: 260px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.hero h1 { margin-bottom: 10px; }
.hero .progress-box { min-width: 280px; flex: 0 1 360px; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.progress-box .row { font-size: 12.5px; }

.install-banner { display: flex; align-items: center; gap: 14px; background: linear-gradient(90deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.08)); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; }
.install-banner .txt { flex: 1; }
.install-banner .txt b { display: block; }
.install-banner .txt span { font-size: 13px; color: var(--text-2); }

.key-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.key-strip div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
@media (max-width: 860px) { .key-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sig {
	width: 30px; height: 30px; border-radius: 9px; flex: none;
	display: grid; place-items: center;
	background: var(--s3); border: 1px solid var(--line);
	font: 700 15px/1 var(--mono); color: var(--text-2);
	transition: all 0.2s var(--ease);
}
.sig.done { background: var(--mint-soft); border-color: rgba(78, 222, 163, 0.35); color: var(--mint); }
.sig.migrated { background: var(--amber-soft); border-color: rgba(245, 158, 11, 0.3); color: var(--amber); }
.sig.cancelled { color: var(--muted); }
.sig.event { color: var(--primary); }
.sig.note { color: var(--muted); }
.sig.prio { background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.3); color: #ff9a8f; }
button.sig:hover { border-color: var(--mint); color: var(--mint); }

/* Daily log */
.daylog { display: grid; gap: 10px; }
.entry {
	position: relative;
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start;
	padding: 12px 14px; border-radius: 14px;
	background: var(--s1); border: 1px solid var(--line);
	transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.entry:hover { border-color: var(--line-2); }
.entry.is-now { background: linear-gradient(90deg, rgba(99, 102, 241, 0.14), var(--s1)); border-color: rgba(128, 131, 255, 0.4); }
.entry.is-now::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: -1px; width: 3px; border-radius: 3px; background: var(--primary-2); box-shadow: 0 0 12px var(--primary-2); }
.entry.done .e-title { text-decoration: line-through; text-decoration-color: rgba(78, 222, 163, 0.6); color: var(--muted); }
.entry.cancelled .e-title, .entry.migrated .e-title { text-decoration: line-through; color: var(--muted); }
.entry .e-time { font: 700 13px var(--mono); color: var(--mint); }
.entry.note .e-time, .entry .e-time.none { color: var(--muted); font-weight: 500; }
.entry .e-title { font-weight: 600; line-height: 1.6; }
.entry .e-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--muted); }
.entry .e-detail { margin-top: 8px; font-size: 13.5px; color: var(--text-2); white-space: pre-line; line-height: 1.8; border-top: 1px dashed var(--line); padding-top: 8px; }
.entry .e-actions { display: flex; gap: 4px; }
.entry .e-actions button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); display: grid; place-items: center; }
.entry .e-actions button:hover { background: var(--s3); color: var(--text); border-color: var(--line); }
.entry.kind-note { background: transparent; border-style: dashed; }
.entry.kind-event .e-title { color: var(--primary); }
.day-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.day-head .date { flex: 1; min-width: 180px; }
.day-head .date b { display: block; font-size: 1.05rem; }
.day-head .date span { font-size: 12.5px; color: var(--muted); }

/* Habits & trackers */
.habit { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.habit .top { display: flex; align-items: center; gap: 10px; }
.habit .top b { flex: 1; font-size: 14px; }
.habit .week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.habit .week button { height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--s3); color: var(--muted); display: grid; place-items: center; font: 600 11px var(--mono); }
.habit .week button.on { background: rgba(99, 102, 241, 0.35); border-color: var(--primary-2); color: #fff; }
.habit .week button.today { outline: 1px dashed var(--mint); outline-offset: 2px; }
.tracker { padding: 12px 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); display: grid; gap: 8px; }
.tracker .top { display: flex; align-items: center; gap: 8px; }
.tracker .top b { flex: 1; font-size: 14px; }
.tracker .val { font: 700 14px var(--mono); color: var(--amber); }
.tracker form { display: flex; gap: 8px; }
.tracker form .input { min-height: 38px; padding: 6px 10px; }
.spark { width: 100%; height: 56px; }
.spark path.l { fill: none; stroke: var(--mint); stroke-width: 2; }
.spark path.a { fill: url(#bp-spark-grad); }
.spark line.t { stroke: var(--amber); stroke-dasharray: 3 4; stroke-width: 1.2; }

.streak { display: flex; align-items: center; gap: 12px; }
.streak .flame { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.streak b { font: 800 1.6rem var(--mono); }

.mood { display: flex; gap: 6px; flex-wrap: wrap; }
.mood button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); font-size: 20px; }
.mood button.on { border-color: var(--primary-2); background: rgba(99, 102, 241, 0.25); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }

/* ------------------------------------------------------------------ */
/* Wizard                                                              */
/* ------------------------------------------------------------------ */

.wiz-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.wiz-head .t { flex: 1; min-width: 240px; }
.cost-box { display: grid; gap: 4px; padding: 12px 16px; border-radius: 14px; background: var(--amber-soft); border: 1px solid rgba(245, 158, 11, 0.28); min-width: 190px; }
.cost-box b { font: 800 1.5rem var(--mono); color: var(--amber); }
.cost-box span { font-size: 12px; color: #f3d7ad; }

.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); font: 700 13px var(--mono); flex: none; }
.step b { display: block; color: var(--text-2); font-size: 13px; }
.step.is-done .n { background: var(--mint-2); color: #04281b; }
.step.is-done b { color: var(--text); }
.step.is-current { border-color: rgba(128, 131, 255, 0.45); background: linear-gradient(90deg, rgba(99, 102, 241, 0.18), var(--s1)); }
.step.is-current .n { background: var(--grad); color: #fff; box-shadow: 0 0 14px rgba(99, 102, 241, 0.6); }
.step.is-current b { color: #fff; }
@media (max-width: 860px) { .stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); } .step { justify-content: center; padding: 8px; } .step .txt { display: none; } }

.search { position: relative; }
/* Icons are direction:ltr (ligatures), so position them physically per page direction. */
.search .material-symbols-rounded { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: var(--muted); }
[dir="rtl"] .search .material-symbols-rounded { left: auto; right: 13px; }
.search .input { padding-inline-start: 42px; }
.cluster-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.topic {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
	padding: 12px; border-radius: 14px; text-align: start;
	background: var(--s1); border: 1px solid var(--line); color: var(--text);
	transition: border-color 0.15s, background 0.15s, transform 0.15s var(--ease);
}
.topic:hover { border-color: var(--line-2); transform: translateY(-1px); }
.topic .ti { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--s3); color: var(--primary); }
.topic .tn { font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.topic .tw { font: 600 11px var(--mono); color: var(--amber); white-space: nowrap; }
.topic .tc { font-size: 11px; color: var(--muted); display: block; }
.topic.is-on { border-color: var(--mint-2); background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), var(--s1)); }
.topic.is-on .ti { background: var(--mint-2); color: #03281b; }
.topic[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.picked { display: flex; flex-wrap: wrap; gap: 8px; }
.picked .chip button { border: 0; background: transparent; color: inherit; padding: 0; display: grid; place-items: center; }

.section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--s1); overflow: hidden; }
.section + .section { margin-top: 12px; }
.section > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.section > summary::-webkit-details-marker { display: none; }
.section > summary b { flex: 1; }
.section > summary small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.section > summary .chev { transition: transform 0.2s; color: var(--muted); }
.section[open] > summary .chev { transform: rotate(180deg); }
.section[open] > summary { border-bottom: 1px solid var(--line); }
.section .body { padding: 16px; }
.section.is-complete > summary .head-icon { background: var(--mint-soft); color: var(--mint); border-color: rgba(78, 222, 163, 0.3); }
.lock-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mint); white-space: nowrap; flex: none; }

.wiz-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 18px; flex-wrap: wrap; }

.synth { display: grid; gap: 22px; justify-items: center; text-align: center; padding: clamp(24px, 6vw, 56px) 16px; }
.orb { width: 128px; height: 128px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 30%, #a5a7ff, #6366f1 45%, #3b1f8f 75%); box-shadow: 0 0 60px rgba(99, 102, 241, 0.55), inset 0 0 30px rgba(255, 255, 255, 0.2); animation: bp-orb 3.2s ease-in-out infinite; }
.orb::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(192, 193, 255, 0.45); animation: bp-spin 12s linear infinite; }
@keyframes bp-orb { 50% { transform: scale(1.05); box-shadow: 0 0 90px rgba(139, 92, 246, 0.7), inset 0 0 30px rgba(255, 255, 255, 0.25); } }
@keyframes bp-spin { to { transform: rotate(360deg); } }
.synth-steps { display: grid; gap: 8px; width: min(520px, 100%); text-align: start; }
.synth-steps div { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.synth-steps div.done { color: var(--text); }
.synth-steps div.done .material-symbols-rounded { color: var(--mint); }
.synth-steps div.now { border-color: rgba(128, 131, 255, 0.45); color: #fff; }
.synth-steps div.now .material-symbols-rounded { color: var(--primary); animation: bp-spin 1.6s linear infinite; }

/* ------------------------------------------------------------------ */
/* Plan view                                                           */
/* ------------------------------------------------------------------ */

.plan-head { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.plan-head .t { flex: 1; min-width: 260px; }
.plan-card { display: grid; gap: 12px; }
.plan-card .row.chips { gap: 6px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.wday { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 180px; display: grid; align-content: start; gap: 6px; }
.wday.is-today { border-color: rgba(78, 222, 163, 0.45); box-shadow: inset 0 0 0 1px rgba(78, 222, 163, 0.2); }
.wday h4 { font-size: 13px; margin: 0 0 4px; display: flex; justify-content: space-between; color: var(--text-2); }
.wday .it { display: flex; gap: 6px; font-size: 12.5px; line-height: 1.5; align-items: flex-start; }
.wday .it .s { font-family: var(--mono); color: var(--muted); flex: none; }
.wday .it.done { color: var(--muted); text-decoration: line-through; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month .dow { text-align: center; font-size: 11.5px; color: var(--muted); padding: 4px 0; }
.mday { aspect-ratio: 1 / 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--s1); padding: 6px; display: grid; align-content: space-between; font: 600 12px var(--mono); color: var(--text-2); text-align: start; }
.mday.out { opacity: 0.25; }
.mday.is-today { border-color: var(--mint); }
.mday .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.mday .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-2); }
.mday .dots i.ev { background: var(--amber); }
.mday.h1 { background: rgba(16, 185, 129, 0.12); }
.mday.h2 { background: rgba(16, 185, 129, 0.24); }
.mday.h3 { background: rgba(16, 185, 129, 0.4); color: #eafff5; }
button.mday:hover { border-color: var(--line-2); }

.timeline { display: grid; gap: 12px; }
.phase { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
.phase .n { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font: 700 15px var(--mono); box-shadow: 0 0 16px rgba(99, 102, 241, 0.4); }
.phase .b { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.phase .b ul { margin: 6px 0 0; padding-inline-start: 18px; color: var(--text-2); font-size: 13.5px; }

.topic-strat { border-inline-start: 3px solid var(--primary-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 10px 0; }
.kpi { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi b { display: block; font-size: 13px; }
.kpi span { font: 600 12.5px var(--mono); color: var(--mint); }
.bullets { margin: 0; padding-inline-start: 18px; color: var(--text-2); font-size: 14px; }
.bullets li { margin-bottom: 4px; }

/* ------------------------------------------------------------------ */
/* Billing                                                             */
/* ------------------------------------------------------------------ */

.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .tiers { grid-template-columns: minmax(0, 1fr); } }
.tier { display: grid; gap: 14px; align-content: start; }
.tier.featured { border-color: rgba(128, 131, 255, 0.55); box-shadow: var(--glow), var(--shadow); }
.tier .price { font: 800 2.2rem/1 var(--mono); }
.tier .price small { font: 600 13px var(--font); color: var(--muted); }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
.tier ul li { display: flex; gap: 8px; align-items: flex-start; }
.tier ul li .material-symbols-rounded { color: var(--mint); font-size: 18px; margin-top: 3px; }
.addr { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--s1); border: 1px dashed var(--line-2); font: 500 13px var(--mono); direction: ltr; word-break: break-all; }
.addr span { flex: 1; }
.qr { width: 180px; height: 180px; padding: 10px; background: #fff; border-radius: 14px; margin-inline: auto; }
.qr svg { width: 100%; height: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; }

/* ------------------------------------------------------------------ */
/* Overlays                                                            */
/* ------------------------------------------------------------------ */

.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(4, 6, 12, 0.72); display: grid; place-items: center; padding: 16px; animation: bp-fade 0.2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: linear-gradient(180deg, #1e2231, #171b28); border: 1px solid var(--line-2); border-radius: 20px; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.12); animation: bp-rise 0.25s var(--ease); }
.modal h2 { display: flex; align-items: center; gap: 10px; }
.modal .close { margin-inline-start: auto; }
@keyframes bp-fade { from { opacity: 0; } }
@keyframes bp-rise { from { transform: translateY(10px); opacity: 0; } }

.toasts { position: fixed; bottom: 88px; inset-inline: 0; z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: #262b3d; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; max-width: 560px; animation: bp-rise 0.25s var(--ease); }
.toast.ok .material-symbols-rounded { color: var(--mint); }
.toast.bad { border-color: rgba(239, 68, 68, 0.45); }
.toast.bad .material-symbols-rounded { color: var(--danger); }

.menu { position: absolute; z-index: 60; min-width: 220px; background: #1e2231; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); text-align: start; font-size: 14px; }
.menu a:hover, .menu button:hover { background: var(--s3); color: var(--text); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.notice-list { display: grid; gap: 8px; }
.notice-item { display: block; padding: 10px 12px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); color: var(--text); }
.notice-item b { display: block; font-size: 14px; }
.notice-item span { font-size: 12.5px; color: var(--muted); }

.skeleton { background: linear-gradient(90deg, var(--s1), var(--s2), var(--s1)); background-size: 200% 100%; animation: bp-sk 1.4s linear infinite; border-radius: 14px; min-height: 90px; }
@keyframes bp-sk { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ */
/* Welcome (signed out)                                                */
/* ------------------------------------------------------------------ */

.welcome { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .welcome { grid-template-columns: minmax(0, 1fr); } }
.welcome .pitch h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.8rem); line-height: 1.25; }
.welcome .pitch h1 em { font-style: normal; background: linear-gradient(90deg, #c0c1ff, #4edea3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feature-list { display: grid; gap: 12px; margin-top: 20px; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature p { margin: 0; color: var(--text-2); font-size: 14px; }
.auth-box .psg-membership { display: grid; gap: 16px; }
.auth-box .psg-membership__grid { display: grid; gap: 16px; }
.auth-box .psg-membership-form { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.auth-box .psg-membership-form h3 { margin: 0 0 6px; }
.auth-box .psg-membership-form__intro { color: var(--muted); font-size: 13px; }
.auth-box .psg-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth-box .psg-form-grid--single { grid-template-columns: minmax(0, 1fr); }
.auth-box .psg-field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.auth-box .psg-field--full { grid-column: 1 / -1; }
.auth-box .psg-field input { width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 12px; border: 1px solid rgba(144, 143, 160, 0.25); background: rgba(15, 23, 42, 0.6); color: var(--text); }
.auth-box .psg-field input:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18); }
.auth-box .psg-field__hint, .auth-box .psg-field__optional { color: var(--muted); font-size: 12px; }
.auth-box .btn--primary { background: var(--grad); color: #fff; border: 0; min-height: 44px; border-radius: 12px; font-weight: 700; padding: 10px 18px; width: 100%; }
.auth-box .btn--secondary { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--line-2); min-height: 44px; border-radius: 12px; font-weight: 700; padding: 10px 18px; width: 100%; }
.auth-box .psg-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.auth-box .psg-membership-notice { padding: 10px 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); font-size: 13.5px; }
.auth-box .psg-form__link { font-size: 13px; }
@media (max-width: 560px) { .auth-box .psg-form-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ */
/* Living plan: rest days, weekly adjustment, change requests          */
/* ------------------------------------------------------------------ */

.rest-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13.5px; }
.rest-banner { margin-bottom: 12px; }
.rest-ic { font-size: 15px; color: var(--primary); vertical-align: middle; }
.mday.rest { background: repeating-linear-gradient(135deg, rgba(192, 193, 255, 0.07) 0 6px, transparent 6px 12px), var(--s1); border-style: dashed; }
.mday.rest > span:first-child { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.wday.is-rest { border-style: dashed; }
.adapt-wrap { margin-top: 18px; }
.adapt-small { font-size: 12.5px; }
.adapt-rec { display: grid; gap: 10px; }
.adapt-rec.is-pending { padding: 14px; border-radius: 14px; border: 1px solid rgba(245, 158, 11, 0.3); background: var(--amber-soft); }
.adapt-sum { margin: 0; }
.adapt-msg { padding: 10px 12px; border-radius: 10px; background: var(--s2); border-inline-start: 3px solid var(--primary-2); white-space: pre-line; font-size: 14px; }
.adapt-req { padding: 8px 12px; border-radius: 10px; background: var(--s2); color: var(--text-2); font-style: italic; white-space: pre-line; font-size: 13.5px; }
.adapt-diff { display: grid; gap: 8px; }
.adapt-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); }
.adapt-row .e-title { font-weight: 600; }
.adapt-row .ba { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; font: 600 12.5px var(--mono); color: var(--muted); }
.adapt-row .ba .was { text-decoration: line-through; opacity: 0.75; }
.adapt-row .ba .now { color: var(--mint); }
.adapt-row.act-drop .e-title { text-decoration: line-through; opacity: 0.7; }
.adapt-row.act-drop .ba .now { color: var(--danger); }
.adapt-row.act-add { border-color: rgba(78, 222, 163, 0.3); }
.adapt-row.act-add .ba .now { text-decoration: none; }
.adapt-hist { border: 1px solid var(--line); border-radius: 12px; background: var(--s1); }
.adapt-hist > summary { cursor: pointer; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.adapt-hist > .adapt-rec { padding: 0 12px 12px; }
.print-bar label { font-size: 13.5px; }
/* Print preview: A4 page width and the binding edge (inline-start: right in RTL, left in LTR). */
.paper-preview.size-a4 .paper { width: min(210mm, 100%); min-height: 260mm; }
.paper-preview.bind .paper { padding-inline-start: 44px; border-inline-start: 3px double #cfcac0; }

/* ------------------------------------------------------------------ */
/* Print — a paper bullet journal (A5-friendly)                        */
/* ------------------------------------------------------------------ */

.print-only { display: none; }
/* On-screen preview of the printable journal: dotted paper pages. */
.paper-preview { display: grid; gap: 18px; justify-items: center; }
.paper-preview .paper { width: min(148mm, 100%); min-height: 180mm; background-color: #f7f5ef; background-image: radial-gradient(#c4c1b8 0.7px, transparent 0.8px); background-size: 18px 18px; color: #1d1d1f; border-radius: 6px; padding: 26px 24px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); font-size: 14px; }
.paper-preview .paper h2 { color: #1d1d1f; font-size: 1.15rem; border-bottom: 2px solid #1d1d1f; padding-bottom: 6px; margin: 0 0 12px; }
.paper-preview .paper h3 { color: #3a3a3c; font-size: 0.95rem; }
.paper-preview .paper p { color: #3a3a3c; }
.paper .p-item { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dotted #bdb9ae; }
.paper .p-item .s { font-family: var(--mono); width: 18px; flex: none; text-align: center; font-weight: 700; }
.paper .p-item .t { font-family: var(--mono); width: 52px; flex: none; color: #6b6b70; }
@media print {
	.paper-preview { display: block; }
	.paper-preview .paper { width: auto; min-height: 0; box-shadow: none; background-color: transparent; font-size: 10pt; }
	@page { size: A5; margin: 10mm; }
	body.bp-body { background: #fff !important; color: #1b1b1b; font-size: 10pt; }
	.topbar, .bottom-nav, .footer, .toasts, .no-print, .tabs, .modal-back { display: none !important; }
	.main { padding: 0; max-width: none; }
	.print-only { display: block; }
	.card, .entry, .kpi, .phase .b, .wday, .mday, .stats .stat { background: transparent !important; box-shadow: none !important; border-color: #cfcfcf !important; color: #1b1b1b !important; }
	.card::before { display: none; }
	.paper { page-break-after: always; background-image: radial-gradient(#b9b9b9 0.6px, transparent 0.7px); background-size: 5mm 5mm; padding: 4mm; border-radius: 0; }
	.paper h2 { font-size: 13pt; border-bottom: 1.5pt solid #1b1b1b; padding-bottom: 2mm; margin-bottom: 3mm; }
	.paper .p-item { display: flex; gap: 3mm; padding: 1.2mm 0; border-bottom: 0.3pt dotted #bbb; }
	.paper .p-item .s { font-family: var(--mono); width: 5mm; flex: none; text-align: center; }
	.paper .p-item .t { font-family: var(--mono); width: 12mm; flex: none; color: #555; }
	.paper-preview.size-a4 .paper { width: auto; min-height: 0; font-size: 11pt; }
	.paper-preview.bind .paper { padding-inline-start: 4mm; border-inline-start: 0; } /* The @page margin carries the binding space. */
	.muted, .e-meta, .sub { color: #555 !important; }
	.chip { background: transparent !important; border: 0.4pt solid #999 !important; color: #333 !important; }
	a { color: inherit; }
}
