/* Sourdough Starter Tracker – earthy, mobile-first */
.sst-wrap {
	--sst-cream: #f7f0e3;
	--sst-card: #fffbf3;
	--sst-ink: #3a2e24;
	--sst-muted: #75654f;
	--sst-line: #e4d6bd;
	--sst-crust: #9a6a35;
	--sst-crust-d: #7d5427;
	--sst-sage: #6f7f4e;
	--sst-sage-d: #44552a;
	--sst-sage-l: #e6ebd5;
	--sst-clay: #b4532a;
	--sst-clay-l: #f6ddd0;

	box-sizing: border-box;
	margin: 1.5em 0;
	padding: 20px;
	background: var(--sst-cream);
	border: 1px solid var(--sst-line);
	border-radius: 18px;
	color: var(--sst-ink);
	line-height: 1.45;
}
.sst-wrap *,
.sst-wrap *::before,
.sst-wrap *::after { box-sizing: border-box; }

/* Header + logo */
.sst-wrap .sst-header {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.sst-wrap .sst-logo {
	display: block;
	max-height: 72px;
	max-width: 160px;
	width: auto;
	height: auto;
	border-radius: 8px;
}
.sst-wrap .sst-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.6rem;
	line-height: 1.2;
	color: var(--sst-crust-d);
}

/* Layout */
.sst-wrap .sst-toolbar { margin-bottom: 16px; }
.sst-wrap .sst-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: 16px;
}
.sst-wrap .sst-empty,
.sst-wrap .sst-loading { margin: 0; color: var(--sst-muted); }
.sst-wrap .sst-error {
	margin-bottom: 14px;
	padding: 10px 14px;
	background: var(--sst-clay-l);
	border: 1px solid var(--sst-clay);
	border-radius: 10px;
	color: #7c2f12;
}
.sst-wrap.sst-busy { cursor: progress; }
.sst-wrap.sst-busy .sst-btn,
.sst-wrap.sst-busy .sst-link { opacity: .6; pointer-events: none; }

/* Card */
.sst-wrap .sst-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	background: var(--sst-card);
	border: 1px solid var(--sst-line);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(58, 46, 36, .06);
}
.sst-wrap .sst-card.sst-running { border-left: 5px solid var(--sst-sage); }
.sst-wrap .sst-card.sst-due {
	border-color: var(--sst-clay);
	border-left: 5px solid var(--sst-clay);
	animation: sst-pulse 2.2s ease-in-out infinite;
}
@keyframes sst-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(180, 83, 42, .35); }
	50%      { box-shadow: 0 0 0 7px rgba(180, 83, 42, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.sst-wrap .sst-card.sst-due { animation: none; }
}

.sst-wrap .sst-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}
.sst-wrap .sst-name {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.25rem;
	line-height: 1.25;
	color: var(--sst-ink);
	overflow-wrap: anywhere;
}

/* Badges */
.sst-wrap .sst-badge {
	flex: none;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: .8rem;
	font-weight: 600;
	white-space: nowrap;
}
.sst-wrap .sst-b-wait  { background: #f1e3c8; color: #6d4a1f; }
.sst-wrap .sst-b-ready { background: var(--sst-sage-l); color: var(--sst-sage-d); }
.sst-wrap .sst-b-none  { background: #ece6da; color: var(--sst-muted); }

/* Dates */
.sst-wrap .sst-meta {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 0;
}
.sst-wrap .sst-meta div { min-width: 0; }
.sst-wrap .sst-meta dt {
	margin: 0;
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--sst-muted);
}
.sst-wrap .sst-meta dd { margin: 2px 0 0; font-size: .92rem; font-weight: 600; }

/* Days-left box */
.sst-wrap .sst-days {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 12px;
}
.sst-wrap .sst-days.sst-b-wait  { background: #f6ecd6; color: #6d4a1f; }
.sst-wrap .sst-days.sst-b-ready { background: var(--sst-sage); color: #fff; }
.sst-wrap .sst-days-n { font-family: Georgia, serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.sst-wrap .sst-days-l { font-weight: 600; }

/* Timer */
.sst-wrap .sst-timer {
	padding: 12px 14px;
	background: var(--sst-cream);
	border-radius: 12px;
	text-align: center;
}
.sst-wrap .sst-card.sst-due .sst-timer { background: var(--sst-clay-l); }
.sst-wrap .sst-timer-label {
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--sst-muted);
}
.sst-wrap .sst-card.sst-due .sst-timer-label { color: var(--sst-clay); font-size: 1rem; }
.sst-wrap .sst-clock {
	margin: 4px 0 8px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 2rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--sst-sage-d);
}
.sst-wrap .sst-card.sst-due .sst-clock { color: var(--sst-clay); font-size: 1.35rem; }
.sst-wrap .sst-clock-idle { font-family: inherit; font-size: 1.1rem; color: var(--sst-muted); font-weight: 600; }
.sst-wrap .sst-bar {
	height: 8px;
	overflow: hidden;
	background: var(--sst-line);
	border-radius: 999px;
}
.sst-wrap .sst-bar span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--sst-sage);
	border-radius: 999px;
	transition: width .8s linear;
}
.sst-wrap .sst-card.sst-due .sst-bar span { background: var(--sst-clay); }
.sst-wrap .sst-lastfed { margin-top: 8px; font-size: .82rem; color: var(--sst-muted); }

/* Notes */
.sst-wrap .sst-note {
	margin: 0;
	padding: 10px 12px;
	background: #f6efdf;
	border-left: 3px solid var(--sst-crust);
	border-radius: 0 8px 8px 0;
	font-size: .92rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* Feeding log */
.sst-wrap .sst-history summary {
	cursor: pointer;
	font-size: .9rem;
	font-weight: 600;
	color: var(--sst-crust-d);
}
.sst-wrap .sst-history ul {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	max-height: 220px;
	overflow-y: auto;
}
.sst-wrap .sst-history li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px dashed var(--sst-line);
	font-size: .85rem;
}
.sst-wrap .sst-log-what { font-weight: 600; }
.sst-wrap .sst-log-fed .sst-log-what { color: var(--sst-sage-d); }
.sst-wrap .sst-log-when { color: var(--sst-muted); text-align: right; }
.sst-wrap .sst-more { margin: 6px 0 0; font-size: .8rem; color: var(--sst-muted); }

/* Buttons (themes love to restyle <button>, so be specific) */
.sst-wrap .sst-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sst-wrap .sst-form .sst-actions { justify-content: flex-start; }
.sst-wrap .sst-btn {
	appearance: none;
	min-height: 44px;
	padding: 10px 18px;
	border: 2px solid var(--sst-crust);
	border-radius: 10px;
	font: inherit;
	font-weight: 700;
	line-height: 1.1;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}
.sst-wrap .sst-btn-primary { background: var(--sst-crust); color: #fff; }
.sst-wrap .sst-btn-primary:hover,
.sst-wrap .sst-btn-primary:focus-visible { background: var(--sst-crust-d); border-color: var(--sst-crust-d); color: #fff; }
.sst-wrap .sst-card.sst-due .sst-btn-primary { background: var(--sst-clay); border-color: var(--sst-clay); }
.sst-wrap .sst-btn-ghost { background: transparent; color: var(--sst-crust-d); }
.sst-wrap .sst-btn-ghost:hover,
.sst-wrap .sst-btn-ghost:focus-visible { background: #f1e6d0; color: var(--sst-crust-d); }
.sst-wrap .sst-btn:focus-visible,
.sst-wrap .sst-link:focus-visible,
.sst-wrap .sst-history summary:focus-visible { outline: 3px solid var(--sst-sage); outline-offset: 2px; }

.sst-wrap .sst-card-foot {
	display: flex;
	gap: 18px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid var(--sst-line);
}
.sst-wrap .sst-link {
	appearance: none;
	min-height: 36px;
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	color: var(--sst-crust-d);
	text-decoration: underline;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}
.sst-wrap .sst-link-danger { color: var(--sst-clay); }

/* Form */
.sst-wrap .sst-field { display: flex; flex-direction: column; gap: 4px; }
.sst-wrap .sst-field span { font-size: .85rem; font-weight: 700; color: var(--sst-muted); }
.sst-wrap .sst-field input,
.sst-wrap .sst-field textarea {
	width: 100%;
	min-height: 44px;
	padding: 9px 12px;
	background: #fff;
	border: 1px solid var(--sst-line);
	border-radius: 10px;
	font: inherit;
	color: var(--sst-ink);
}
.sst-wrap .sst-field textarea { resize: vertical; }
.sst-wrap .sst-field input:focus,
.sst-wrap .sst-field textarea:focus {
	outline: 3px solid rgba(111, 127, 78, .45);
	border-color: var(--sst-sage);
}

@media (max-width: 480px) {
	.sst-wrap { padding: 14px; border-radius: 14px; }
	.sst-wrap .sst-title { font-size: 1.35rem; }
	.sst-wrap .sst-grid { grid-template-columns: 1fr; }
	.sst-wrap .sst-clock { font-size: 1.8rem; }
	.sst-wrap .sst-actions .sst-btn { flex: 1 1 auto; }
}
