/* HEF — news, Community Sunday registration, login and team area.
   Uses the tokens from theme.css; nothing here introduces new colours
   except the two status hues (ok / error), tuned for the dark background. */

:root {
	--ok:    #8fc79a;
	--error: #f08a7a;
}

/* ---------- forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form input:not([type=checkbox]):not([type=file]),
.form select,
.form textarea {
	width: 100%;
	font: inherit;
	font-weight: 400;
	font-size: 1rem;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0.75rem 0.9rem;
}
.form textarea { resize: vertical; min-height: 12rem; line-height: 1.6; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible,
.form button:focus-visible, .pill:focus-visible, .linkbtn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.form input[type=file] { font: inherit; font-size: 0.9rem; color: var(--text-dim); }
.form input[type=date] { color-scheme: dark; max-width: 14rem; }
.form .btn { justify-self: start; cursor: pointer; }
.form__row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.form fieldset { border: 1px solid var(--line); padding: 1rem; margin: 0; display: grid; gap: 0.75rem; }
.form legend { font-size: 0.85rem; font-weight: 600; padding: 0 0.4rem; }
.form label.check, label.check {
	display: flex; gap: 0.6rem; align-items: flex-start;
	font-weight: 400; color: var(--text-dim); line-height: 1.5;
}
label.check input { margin-top: 0.25rem; accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
label.check a { color: var(--text); }
.hint { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); margin: 0; }
details.hint summary { cursor: pointer; }
details.hint code { color: var(--text-dim); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.inline { display: inline; }
.btn--danger { border-color: var(--error); color: var(--error); cursor: pointer; }
.btn--danger:hover, .btn--danger:focus-visible { background: var(--error); color: var(--accent-ink); }
.linkbtn {
	background: none; border: 0; padding: 0; font: inherit; font-size: 0.85rem;
	color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.linkbtn:hover { color: var(--accent); }
.linkbtn--danger { color: var(--error); }

/* ---------- messages ---------- */
.notices { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }
.notice {
	margin: 0; max-width: none;
	padding: 0.8rem 1rem;
	border-left: 3px solid var(--accent);
	background: var(--surface-2);
	color: var(--text);
	font-size: 0.92rem;
}
.notice--error { border-left-color: var(--error); }

/* ---------- boxes, tables, tags ---------- */
.box { background: var(--surface); border: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2rem); }
.box--ok { border-color: var(--ok); }
.box--ok .box__title { color: var(--ok); }
.box__head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.box__head .team__lead { margin: 0; }
.box__title { font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 0 0 1rem; }
.box__head .box__title { margin: 0; }
.empty { color: var(--text-muted); font-style: italic; }
.link-back { color: var(--text-dim); font-size: 0.85rem; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-bottom: 1rem; }
.tbl th {
	text-align: left; font-family: var(--font-head); text-transform: uppercase;
	font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-muted);
	padding: 0 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 0.8rem 0.75rem 0.8rem 0; border-bottom: 1px solid var(--line); color: var(--text-dim); vertical-align: top; }
.tbl td strong { color: var(--text); font-weight: 600; }
.tbl td a { color: var(--text); }
.tbl small { color: var(--text-muted); }
.tbl__act { text-align: right; white-space: nowrap; }
.tbl tr.is-off td { opacity: 0.55; }
.tbl tr.is-paid td { color: var(--text-muted); }
.tbl select { font: inherit; font-size: 0.85rem; color: var(--text); background: var(--bg); border: 1px solid var(--line); padding: 0.3rem 0.4rem; }

.tag { font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.5rem; border: 1px solid var(--line); color: var(--text-muted); white-space: nowrap; }
.tag--ok { color: var(--ok); border-color: rgba(143, 199, 154, 0.35); }
.tag--off { color: var(--error); border-color: rgba(240, 138, 122, 0.35); }

.pill {
	font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer;
	padding: 0.25rem 0.7rem; border-radius: 999px;
	background: transparent; color: var(--text-muted); border: 1px solid var(--line);
}
.pill--on { color: var(--accent-ink); background: var(--ok); border-color: var(--ok); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0 0 1rem; }
.facts dt { color: var(--text-muted); font-size: 0.85rem; }
.facts dd { margin: 0; color: var(--text); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.pw { font-size: 1.15rem; letter-spacing: 0.06em; color: var(--accent); user-select: all; }
.pwbox { border: 1px solid var(--accent); background: var(--surface-2); padding: 1.5rem; margin-bottom: 2rem; }
.pwbox p { max-width: none; }

details.menu { position: relative; display: inline-block; }
details.menu summary { cursor: pointer; font-size: 0.85rem; color: var(--text-dim); list-style: none; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary::after { content: ' ▾'; }
.menu__pop {
	position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 5;
	display: grid; gap: 0.6rem; padding: 0.9rem 1rem; text-align: left;
	background: var(--surface-3); border: 1px solid var(--line); min-width: 13rem;
}

/* ---------- team area ---------- */
.teamnav { border-bottom: 1px solid var(--line); background: var(--surface); }
.teamnav__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-block: 0.6rem; }
.teamnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.teamnav a { font-size: 0.85rem; text-decoration: none; color: var(--text-dim); }
.teamnav li.active a, .teamnav a:hover { color: var(--accent); }
.teamnav__who { margin-left: auto; font-size: 0.8rem; color: var(--text-muted); }
.teamnav__who a { font-size: inherit; text-decoration: underline; }
.page-head--team h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.page-head--team { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.team { padding-bottom: var(--section); }
.team__lead { color: var(--text-dim); }

.tiles-team { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tcard {
	display: block; text-decoration: none; padding: 1.75rem;
	background: var(--surface); border: 1px solid var(--line); transition: border-color .18s ease;
}
.tcard:hover, .tcard:focus-visible { border-color: var(--accent); }
.tcard h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin: 0.4rem 0 0.75rem; }
.tcard p { margin: 0; font-size: 0.92rem; }
.tcard strong { color: var(--text); }

.split-team { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.split-team--wide { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }

.sunday { display: grid; gap: 1.5rem; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; }
.sunday__side { display: grid; gap: 1.5rem; }
.termin-list { list-style: none; margin: 0; padding: 0; }
.termin-list li + li { border-top: 1px solid var(--line); }
.termin-list a { display: grid; gap: 0.1rem; padding: 0.7rem 0.6rem; text-decoration: none; color: var(--text); font-size: 0.92rem; }
.termin-list small { color: var(--text-muted); font-size: 0.78rem; }
.termin-list li.active a { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.termin-list li.is-past a { opacity: 0.6; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 1.5rem; }
.stats > div { background: var(--surface); padding: 1rem 1.1rem; font-size: 0.78rem; color: var(--text-muted); }
.stats span { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--text); line-height: 1.2; }

.thumb { max-width: 240px; border: 1px solid var(--line); }
.danger-zone { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ---------- login ---------- */
.loginbox { max-width: 28rem; }
.loginbox .box { margin-bottom: 1rem; }
.loginbox .hint { margin-top: 1rem; }

/* ---------- public: news ---------- */
.news-intro { margin-bottom: 2rem; }
.newsgrid { display: grid; gap: clamp(1.25rem, 2.5vw, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.newscard { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); transition: border-color .18s ease; }
.newscard:hover, .newscard:focus-visible { border-color: var(--accent); }
.newscard img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.newscard__ph { aspect-ratio: 8 / 5; display: grid; place-items: center; font-size: 2.5rem; color: var(--line); background: var(--surface-2); }
.newscard__body { padding: 1.5rem; }
.newscard h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 0.4rem 0 0.6rem; }
.newscard p { font-size: 0.92rem; margin: 0; }
.post__title { font-size: clamp(2.2rem, 6vw, 4.5rem) !important; }
.post__img { width: 100%; max-height: 70vh; object-fit: cover; margin-bottom: 2.5rem; border: 1px solid var(--line); }
.eyebrow a { color: inherit; text-decoration: none; }

/* ---------- public: Community Sunday registration ---------- */
.anmeldung { border-top: 1px solid var(--line); background: var(--surface); }
.anmeldung__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.anmeldung .box { background: var(--bg); }
.termine--public { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.termine--public li { grid-template-columns: 4rem minmax(0, 1fr); padding: 0.8rem 0; }
.termine--public .termin__titel { color: var(--text); font-size: 1rem; }

@media (max-width: 860px) {
	.sunday, .split-team--wide, .anmeldung__grid { grid-template-columns: 1fr; }
	.teamnav__who { margin-left: 0; width: 100%; }
	/* tables become stacked cards */
	.tbl thead { display: none; }
	.tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
	.tbl tr { border: 1px solid var(--line); padding: 0.75rem 1rem; margin-bottom: 0.75rem; background: var(--surface); }
	.tbl td { border: 0; padding: 0.2rem 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem; }
	.tbl td::before { content: attr(data-l); font-size: 0.75rem; color: var(--text-muted); }
	.tbl td.tbl__act { display: block; text-align: left; padding-top: 0.5rem; }
	.menu__pop { left: 0; right: auto; }
}

@media print {
	body { background: #fff; color: #000; }
	body::before, .site-header, .site-footer, .teamnav, .sunday__side, .no-print, .page-head { display: none !important; }
	.sunday { display: block; }
	.tbl td, .tbl th, .stats > div, .stats span, .box__title, .tbl td strong { color: #000 !important; background: #fff !important; }
	.tbl td, .tbl th { border-color: #999 !important; }
	.pill { border: 0; padding: 0; color: #000; background: none; }
}
