/* HELA Daily Drawing Tracker
   Dark panel, monospace labels, solid pressable tiles.
   Two columns from 760px, single column below. Self-contained. */

.hela-dt {
	--hela-accent: #ed3106;
	--hela-accent-dark: #7d1a03;
	--hela-gold: #ffc800;
	--hela-bg: #0a0a0a;
	--hela-tile: #171717;
	--hela-sunk: #101010;
	--hela-line: #202020;
	--hela-edge: #2c2c2c;
	--hela-ink: #f2f2f2;
	--hela-mute: #8a8a8a;
	--hela-faint: #4a4a4a;
	--hela-dim: #2a2a2a;
	--hela-mono: ui-monospace, "SF Mono", "Roboto Mono", "DejaVu Sans Mono", monospace;
	--hela-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--hela-lift: 3px;

	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 1040px;
	margin: 2rem auto;
	padding: 1.9rem;
	background: var(--hela-bg);
	border: 1px solid var(--hela-edge);
	border-radius: 14px;
	color: var(--hela-ink);
	font-family: var(--hela-mono);
	line-height: 1.5;
}

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

.hela-dt__eyebrow {
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

/* Wordmark and tagline */

.hela-dt__brand {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.15rem 0.7rem;
	padding-bottom: 1rem;
}

.hela-dt__brand-mark {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: #ffffff;
}

.hela-dt__brand-tag {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: lowercase;
	color: var(--hela-accent);
}

@media (max-width: 480px) {
	.hela-dt__brand-mark {
		font-size: 18px;
		letter-spacing: 0.2em;
	}

	.hela-dt__brand-tag {
		font-size: 10px;
	}
}

.hela-dt__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 1rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--hela-line);
}

.hela-dt__owner {
	margin: 0;
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hela-faint);
}

.hela-dt__loading {
	margin: 1.5rem 0;
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

/* Layout: stacked on phones, two columns on wider screens. */

.hela-dt__layout {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 880px) {
	.hela-dt {
		padding: 2.25rem;
	}

	.hela-dt__layout {
		grid-template-columns: minmax(280px, 340px) 1fr;
		grid-template-rows: auto 1fr;
		gap: 1.25rem 1.75rem;
		align-items: start;
	}

	.hela-dt__block--head {
		grid-column: 1;
		grid-row: 1;
	}

	.hela-dt__block--tail {
		grid-column: 1;
		grid-row: 2;
	}

	.hela-dt__block--cal {
		grid-column: 2;
		grid-row: 1 / span 2;
	}
}

/* Readout card */

.hela-dt__card {
	padding: 1.1rem;
	background: var(--hela-tile);
	border-radius: 10px;
}

.hela-dt__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding-bottom: 1rem;
}

.hela-dt__hero {
	display: flex;
	align-items: baseline;
	gap: 0.45rem;
}

.hela-dt__hero-num {
	font-size: 58px;
	font-weight: 500;
	line-height: 0.88;
	letter-spacing: -0.05em;
	font-variant-numeric: tabular-nums;
	color: var(--hela-accent);
}

.hela-dt__hero-label {
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--hela-mute);
	max-width: 4.5em;
}

.hela-dt__stats {
	display: flex;
	gap: 1.1rem;
	text-align: right;
}

.hela-dt__stat {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.hela-dt__stat-val {
	font-size: 22px;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.hela-dt__stat-key {
	font-size: 9px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

/* Month progress */

.hela-dt__progress-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.4rem;
}

.hela-dt__progress-label,
.hela-dt__progress-count {
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

.hela-dt__progress-count {
	color: var(--hela-ink);
	font-variant-numeric: tabular-nums;
}

.hela-dt__track {
	height: 13px;
	background: var(--hela-sunk);
	border: 1px solid var(--hela-line);
	border-radius: 999px;
	overflow: hidden;
}

.hela-dt__fill {
	height: 100%;
	min-width: 13px;
	background: var(--hela-accent);
	border-radius: 999px;
	transition: width 0.35s ease;
}

/* Class pulse */

.hela-dt__pulse {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-top: 0.75rem;
	padding: 0.7rem 0.85rem;
	background: var(--hela-tile);
	border-radius: 10px;
}

.hela-dt__pulse-dot {
	width: 7px;
	height: 7px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--hela-accent);
	animation: hela-dt-pulse 2.4s ease-in-out infinite;
}

@keyframes hela-dt-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.2;
	}
}

.hela-dt__pulse-txt {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

/* Month bar */

.hela-dt__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding-bottom: 0.85rem;
}

.hela-dt__month {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #ffffff;
}

.hela-dt__nav-btn {
	width: 42px;
	height: 42px;
	padding: 0;
	background: var(--hela-tile);
	border: 1px solid var(--hela-edge);
	border-bottom-width: var(--hela-lift);
	border-radius: 8px;
	color: var(--hela-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.hela-dt__nav-btn:hover:not([disabled]) {
	background: #202020;
}

.hela-dt__nav-btn:active:not([disabled]) {
	transform: translateY(2px);
	border-bottom-width: 1px;
}

.hela-dt__nav-btn[disabled] {
	color: var(--hela-dim);
	cursor: default;
	opacity: 0.5;
}

/* Day tiles */

.hela-dt__cal {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 10px;
	padding-top: 4px;
}

.hela-dt__dow {
	padding-bottom: 0.5rem;
	text-align: center;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #b4b4b4;
}

.hela-dt__day {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	aspect-ratio: 1 / 1;
	padding: 0 0 2px;
	background: var(--hela-tile);
	border: 0;
	border-bottom: var(--hela-lift) solid #000;
	border-radius: 11px;
	color: #d0d0d0;
	font-family: inherit;
	appearance: none;
}

.hela-dt__day--blank {
	background: transparent;
	border-bottom-color: transparent;
}

.hela-dt__num {
	font-size: clamp(14px, 2.6vw, 19px);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.hela-dt__stars {
	display: flex;
	gap: 1px;
	height: 10px;
	align-items: center;
}

.hela-dt__star {
	width: 8px;
	height: 8px;
	display: block;
	fill: #4c4c4c;
}

/* Open, not yet marked */

.hela-dt__day.is-open {
	cursor: pointer;
	color: #ffffff;
	background: #202020;
}

.hela-dt__day.is-open:hover {
	background: #2c2c2c;
	color: #ffffff;
}

.hela-dt__day.is-open:active {
	transform: translateY(2px);
	border-bottom-width: 1px;
}

.hela-dt__day:focus-visible {
	outline: 2px solid var(--hela-ink);
	outline-offset: 2px;
}

/* Marked: the tile fills with the practice colour.
   --hela-day is set inline per day. */

.hela-dt__day.is-marked {
	--hela-day: var(--hela-accent);
	background: var(--hela-day);
	border-bottom-color: color-mix(in srgb, var(--hela-day) 52%, #000);
	color: #0a0a0a;
}

.hela-dt__day.is-marked .hela-dt__star {
	fill: rgba(10, 10, 10, 0.82);
}

.hela-dt__day.is-today {
	box-shadow: 0 0 0 2px var(--hela-bg), 0 0 0 4px var(--hela-ink);
}

.hela-dt__day.is-locked:not(.is-marked) {
	background: #151515;
	border-bottom-color: #000;
	color: #8e8e8e;
}

.hela-dt__day.is-locked:not(.is-marked) .hela-dt__star {
	fill: #3a3a3a;
}

.hela-dt__day.is-locked.is-marked {
	border-bottom-width: 0;
	padding-bottom: 2px;
	filter: saturate(0.92);
}

.hela-dt__day.is-future .hela-dt__star {
	fill: transparent;
}

/* Star tiers grow with the streak. */

.hela-dt__stars--t0 {
	opacity: 0.7;
}

.hela-dt__stars--t2 .hela-dt__star,
.hela-dt__stars--t3 .hela-dt__star,
.hela-dt__stars--t4 .hela-dt__star {
	width: 9px;
	height: 9px;
}

.hela-dt__stars--t5 .hela-dt__star {
	width: 10px;
	height: 10px;
}

/* Milestone days go gold and wear a ring. */

.hela-dt__day.is-milestone {
	--hela-day: var(--hela-gold);
}

.hela-dt__day.is-milestone::after {
	content: "";
	position: absolute;
	inset: -4px;
	border: 2px solid var(--hela-gold);
	border-radius: 12px;
	box-shadow: 0 0 10px color-mix(in srgb, var(--hela-gold) 55%, transparent);
	pointer-events: none;
}

/* A small notch at the top so a milestone reads even in a screenshot. */
.hela-dt__day.is-milestone::before {
	content: "";
	position: absolute;
	top: -7px;
	left: 50%;
	width: 10px;
	height: 4px;
	margin-left: -5px;
	background: var(--hela-gold);
	border-radius: 2px;
	pointer-events: none;
	z-index: 1;
}

/* Today keeps its white ring; a milestone today shows both. */
.hela-dt__day.is-milestone.is-today {
	box-shadow: 0 0 0 6px var(--hela-bg), 0 0 0 8px var(--hela-ink);
}

/* Legend */

.hela-dt__legend {
	padding-top: 1rem;
	border-top: 1px solid var(--hela-line);
}

.hela-dt__keys {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.65rem;
}

.hela-dt__key {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.55rem;
	background: var(--hela-tile);
	border-radius: 999px;
}

.hela-dt__key-chip {
	width: 10px;
	height: 10px;
	flex: 0 0 auto;
	border-radius: 50%;
}

.hela-dt__key-label {
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

.hela-dt__key-num {
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: var(--hela-ink);
}

/* Footer */

.hela-dt__foot {
	padding-top: 1rem;
	margin-top: 1rem;
	border-top: 1px solid var(--hela-line);
}

.hela-dt__hint {
	margin: 0 0 0.8rem;
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hela-faint);
}

.hela-dt__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

/* Buttons with a pressable bottom edge. */

.hela-dt__btn {
	display: inline-block;
	padding: 0.8rem 1.2rem;
	background: var(--hela-tile);
	border: 1px solid var(--hela-edge);
	border-bottom-width: var(--hela-lift);
	border-radius: 10px;
	color: var(--hela-ink);
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}

.hela-dt__btn:hover {
	background: #212121;
}

.hela-dt__btn:active {
	transform: translateY(2px);
	border-bottom-width: 1px;
}

.hela-dt__btn--quiet {
	color: var(--hela-mute);
}

.hela-dt__btn--danger {
	color: var(--hela-accent);
	border-color: color-mix(in srgb, var(--hela-accent) 45%, transparent);
}

.hela-dt__btn--solid {
	background: var(--hela-accent);
	border-color: var(--hela-accent);
	border-bottom-color: var(--hela-accent-dark);
	color: #fff;
	padding: 0.8rem 1.5rem;
	font-size: 11px;
}

.hela-dt__btn--solid:hover {
	background: #ff3d0d;
}

.hela-dt__btn:focus-visible {
	outline: 2px solid var(--hela-ink);
	outline-offset: 2px;
}

.hela-dt__note {
	margin: 0.75rem 0 0;
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

.hela-dt__msg {
	margin: 0.75rem 0 0;
	font-family: var(--hela-sans);
	font-size: 13px;
	color: var(--hela-accent);
	text-transform: none;
	letter-spacing: 0;
}

/* Overlay */

.hela-dt__pop {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(4, 4, 4, 0.9);
	border-radius: 14px;
}

/* Practice picker */

.hela-dt__sheet {
	width: 100%;
	max-width: 380px;
	padding: 1.25rem;
	background: var(--hela-bg);
	border: 1px solid var(--hela-edge);
	border-radius: 12px;
}

.hela-dt__sheet-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.85rem;
}

.hela-dt__sheet-date {
	margin: 0;
	font-size: 10px;
	letter-spacing: 0.08em;
	color: var(--hela-faint);
	font-variant-numeric: tabular-nums;
}

.hela-dt__slots {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.hela-dt__slot {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	width: 100%;
	padding: 0.9rem 0.95rem;
	background: var(--hela-tile);
	border: 1px solid var(--hela-line);
	border-bottom-width: var(--hela-lift);
	border-radius: 10px;
	color: var(--hela-ink);
	font-family: inherit;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-align: left;
	cursor: pointer;
}

.hela-dt__slot:hover {
	background: #212121;
}

.hela-dt__slot:active {
	transform: translateY(2px);
	border-bottom-width: 1px;
}

.hela-dt__slot.is-on {
	background: var(--hela-ink);
	border-color: var(--hela-ink);
	border-bottom-color: #6f6f6f;
	color: #0a0a0a;
}

.hela-dt__slot:focus-visible {
	outline: 2px solid var(--hela-ink);
	outline-offset: 2px;
}

.hela-dt__slot-idx {
	font-size: 10px;
	font-variant-numeric: tabular-nums;
	color: var(--hela-faint);
}

.hela-dt__slot.is-on .hela-dt__slot-idx {
	color: rgba(10, 10, 10, 0.45);
}

.hela-dt__slot-chip {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
	border-radius: 50%;
}

.hela-dt__slot-label {
	flex: 1 1 auto;
}

.hela-dt__slot-mark {
	font-size: 9px;
}

.hela-dt__sheet-foot {
	display: flex;
	gap: 0.4rem;
	padding-top: 0.85rem;
}

.hela-dt__sheet-foot .hela-dt__btn {
	flex: 1 1 auto;
	text-align: center;
}

/* Congratulation card */

.hela-dt__pop-card {
	max-width: 360px;
	padding: 2rem 1.8rem;
	text-align: center;
	background: var(--hela-bg);
	border: 1px solid var(--hela-pop, var(--hela-accent));
	border-radius: 12px;
}

.hela-dt__pop-eyebrow {
	margin: 0;
	font-size: 9px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--hela-pop, var(--hela-accent));
}

.hela-dt__pop-num {
	margin: 0.3rem 0 0;
	font-size: 84px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.05em;
	font-variant-numeric: tabular-nums;
	color: var(--hela-pop, var(--hela-accent));
}

.hela-dt__pop-days {
	margin: 0;
	font-size: 9px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--hela-faint);
}

.hela-dt__pop-msg {
	margin: 1rem 0 0;
	font-family: var(--hela-sans);
	font-size: 17px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--hela-ink);
}

.hela-dt__pop-tagline {
	margin: 0.5rem 0 1.3rem;
	font-size: 9px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hela-mute);
}

.hela-dt__confetti {
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
}

/* Signed out */

.hela-dt--gate {
	max-width: 460px;
}

.hela-dt__gate-copy {
	margin: 0.85rem 0 1.25rem;
	font-family: var(--hela-sans);
	font-size: 15px;
}

.hela-dt__noscript {
	font-family: var(--hela-sans);
	font-size: 13px;
	color: var(--hela-mute);
}

/* Phones */

@media (max-width: 480px) {
	.hela-dt {
		padding: 1rem;
		margin: 1.25rem auto;
		border-radius: 10px;
	}

	.hela-dt__hero-num {
		font-size: 46px;
	}

	.hela-dt__stats {
		gap: 0.9rem;
	}

	.hela-dt__cal {
		gap: 7px;
	}

	.hela-dt__day.is-milestone::after {
		inset: -3px;
		border-width: 1.5px;
		border-radius: 9px;
	}

	.hela-dt__day.is-milestone::before {
		top: -5px;
		width: 8px;
		height: 3px;
		margin-left: -4px;
	}

	.hela-dt__day {
		border-radius: 6px;
		gap: 1px;
	}

	.hela-dt__star {
		width: 5px;
		height: 5px;
	}

	.hela-dt__stars--t2 .hela-dt__star,
	.hela-dt__stars--t3 .hela-dt__star,
	.hela-dt__stars--t4 .hela-dt__star,
	.hela-dt__stars--t5 .hela-dt__star {
		width: 6px;
		height: 6px;
	}

	.hela-dt__btn {
		flex: 1 1 auto;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hela-dt *,
	.hela-dt *::before,
	.hela-dt *::after {
		transition: none !important;
		animation: none !important;
	}
}
