/* Tribal101 — Sovereign Registry (spec §6). Phase 4a. */

/* --- Search terminal (§6.1) --- */
.t101-registry { max-width: 1120px; margin: 0 auto; padding: var(--t101-sp-6) var(--t101-sp-4) var(--t101-sp-12); }
.t101-regsearch__bar { display: flex; gap: var(--t101-sp-2); margin-bottom: var(--t101-sp-4); }
.t101-regsearch__bar input[type="search"] {
	flex: 1; padding: var(--t101-sp-3) var(--t101-sp-4);
	font-family: var(--t101-font-mono); font-size: var(--t101-fs-sm);
	color: var(--t101-ink); background: var(--t101-paper-raised);
	border: 1px solid var(--t101-line); border-radius: var(--t101-radius);
}
.t101-regsearch__bar input[type="search"]:focus {
	outline: 2px solid var(--t101-brass); outline-offset: 1px; border-color: var(--t101-brass);
}

/* --- Filter chip groups --- */
.t101-regfilters { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--t101-sp-2); margin-bottom: var(--t101-sp-4); }
.t101-regfilters__group { position: relative; }
.t101-regfilters__group summary {
	cursor: pointer; list-style: none; user-select: none;
	font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); letter-spacing: .04em;
	padding: var(--t101-sp-2) var(--t101-sp-3);
	border: 1px solid var(--t101-line); border-radius: var(--t101-radius-pill);
	background: var(--t101-paper-raised); color: var(--t101-evergreen);
}
.t101-regfilters__group summary::-webkit-details-marker { display: none; }
.t101-regfilters__group[open] summary { border-color: var(--t101-brass); background: var(--t101-brass-soft); }
.t101-regfilters__count {
	display: inline-block; min-width: 1.2em; text-align: center;
	background: var(--t101-brass); color: var(--t101-paper);
	border-radius: var(--t101-radius-pill); font-size: var(--t101-fs-xs); padding: 0 .3em;
}
.t101-regfilters__opts {
	position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; min-width: 220px;
	display: flex; flex-direction: column; gap: var(--t101-sp-1);
	background: var(--t101-paper-raised); border: 1px solid var(--t101-line);
	border-radius: var(--t101-radius); box-shadow: var(--t101-shadow); padding: var(--t101-sp-3);
}
.t101-regfilters__opt { font-size: var(--t101-fs-sm); color: var(--t101-ink); display: flex; gap: .5em; align-items: center; }
.t101-regfilters__opt input { accent-color: var(--t101-brass); }
.t101-regfilters__clear { font-size: var(--t101-fs-sm); color: var(--t101-clay); align-self: center; }

/* --- View toggle --- */
.t101-regviews { display: flex; gap: 0; border-bottom: 2px solid var(--t101-line); margin-bottom: var(--t101-sp-6); }
.t101-regviews__tab {
	font-family: var(--t101-font-mono); font-size: var(--t101-fs-sm); letter-spacing: .04em;
	padding: var(--t101-sp-2) var(--t101-sp-4); color: var(--t101-ink-muted);
	text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.t101-regviews__tab.is-active { color: var(--t101-evergreen); border-bottom-color: var(--t101-brass); font-weight: 600; }
.t101-regcount { font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); color: var(--t101-ink-muted); margin-bottom: var(--t101-sp-3); }
.t101-regempty { color: var(--t101-ink-muted); padding: var(--t101-sp-8) 0; }

/* --- Result grid --- */
.t101-reggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--t101-sp-4); }
.t101-regcard {
	background: var(--t101-paper-raised); border: 1px solid var(--t101-line);
	border-radius: var(--t101-radius); padding: var(--t101-sp-4);
	box-shadow: var(--t101-shadow-sm); transition: box-shadow var(--t101-dur) var(--t101-ease);
}
.t101-regcard:hover { box-shadow: var(--t101-shadow); }
.t101-regcard__name { font-family: var(--t101-font-display); font-size: var(--t101-fs-md); margin: 0 0 var(--t101-sp-2); line-height: 1.25; }
.t101-regcard__name a { color: var(--t101-evergreen); text-decoration: none; }
.t101-regcard__name a:hover { color: var(--t101-clay); }
.t101-regcard__tokens { display: flex; flex-wrap: wrap; gap: var(--t101-sp-1); margin-bottom: var(--t101-sp-2); }
.t101-regcard__meta { font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); color: var(--t101-ink-muted); margin: 0 0 var(--t101-sp-1); }
.t101-regcard__sectors { font-size: var(--t101-fs-sm); margin: 0; }
.t101-regcard__sectors a { color: var(--t101-river); }
.t101-regpager { display: flex; align-items: center; justify-content: center; gap: var(--t101-sp-4); margin-top: var(--t101-sp-8); font-family: var(--t101-font-mono); font-size: var(--t101-fs-sm); }

/* --- A–Z directory --- */
.t101-regaz__nav { display: flex; flex-wrap: wrap; gap: var(--t101-sp-1); font-family: var(--t101-font-mono); margin-bottom: var(--t101-sp-6); }
.t101-regaz__nav a, .t101-regaz__nav span {
	display: inline-block; min-width: 2em; text-align: center; padding: var(--t101-sp-1);
	border-radius: var(--t101-radius-sm); text-decoration: none;
}
.t101-regaz__nav a { color: var(--t101-evergreen); background: var(--t101-brass-soft); font-weight: 600; }
.t101-regaz__nav a:hover { background: var(--t101-brass); color: var(--t101-paper); }
.t101-regaz__nav span { color: var(--t101-ink-muted); opacity: .45; }
.t101-regaz__group h3 { font-family: var(--t101-font-display); color: var(--t101-brass); font-size: var(--t101-fs-xl); border-bottom: 1px solid var(--t101-line); margin: var(--t101-sp-6) 0 var(--t101-sp-2); }
.t101-regaz__group ul { list-style: none; margin: 0; padding: 0; }
.t101-regaz__group li { padding: var(--t101-sp-1) 0; display: flex; align-items: baseline; gap: var(--t101-sp-2); flex-wrap: wrap; }
.t101-regaz__group li a { color: var(--t101-ink); text-decoration: none; }
.t101-regaz__group li a:hover { color: var(--t101-clay); }

/* --- Tribe profile (§6.2 A–F) --- */
.t101-profile { max-width: 880px; margin: 0 auto; padding: var(--t101-sp-4) var(--t101-sp-4) var(--t101-sp-12); }
/* Divi default byline/date suppressed on all t101 CPT singles (body class via core cpt.php) */
.t101-single .post-meta { display: none; }

/* §6.2 folder-tab record index (A–F). JS switches sections; no-JS shows all, tabs act as anchors. */
.t101-profile__tabs {
	display: flex; align-items: flex-end; gap: 3px;
	overflow-x: auto; scrollbar-width: none;
	position: sticky; top: 0; z-index: 40; background: var(--t101-paper);
	padding-top: var(--t101-sp-3);
}
.t101-profile__tabs::-webkit-scrollbar { display: none; }
.t101-profile__tab {
	font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); letter-spacing: .04em;
	white-space: nowrap; text-decoration: none; color: var(--t101-ink-muted);
	background: #E9E5D9; border: 1px solid var(--t101-line); border-bottom: none;
	border-radius: 6px 6px 0 0; padding: var(--t101-sp-1) var(--t101-sp-3) var(--t101-sp-2);
}
.t101-profile__tab-letter { color: var(--t101-brass); font-weight: 600; }
.t101-profile__tab:hover { background: var(--t101-paper-raised); color: var(--t101-evergreen); }
.t101-profile__tab.is-active {
	background: var(--t101-paper-raised); color: var(--t101-evergreen); font-weight: 500;
	padding-top: calc(var(--t101-sp-1) + 3px); margin-bottom: -1px; position: relative; z-index: 1;
}
.t101-profile__panel {
	background: var(--t101-paper-raised); border: 1px solid var(--t101-line);
	padding: var(--t101-sp-6); margin-bottom: var(--t101-sp-6);
}
.t101-profile__sec { margin-bottom: var(--t101-sp-8); scroll-margin-top: 80px; }
.t101-profile__sec h2 {
	font-family: var(--t101-font-display); color: var(--t101-evergreen); font-size: var(--t101-fs-lg);
	border-bottom: 2px solid var(--t101-brass); padding-bottom: var(--t101-sp-2); margin-bottom: var(--t101-sp-4);
}
.t101-profile__tokens { display: flex; flex-wrap: wrap; gap: var(--t101-sp-1); margin-bottom: var(--t101-sp-4); }
.t101-profile__dl { margin: 0; }
.t101-profile__row { display: grid; grid-template-columns: 240px 1fr; gap: var(--t101-sp-3); padding: var(--t101-sp-2) 0; border-bottom: 1px dotted var(--t101-line); }
.t101-profile__row dt { font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); letter-spacing: .03em; color: var(--t101-ink-muted); }
.t101-profile__row dd { margin: 0; font-size: var(--t101-fs-sm); color: var(--t101-ink); }
.t101-profile__cite { font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); color: var(--t101-ink-muted); }
.t101-profile__none { color: var(--t101-ink-muted); font-style: italic; }
.t101-profile__hint { font-size: var(--t101-fs-xs); color: var(--t101-ink-muted); }
.t101-profile__entity { background: var(--t101-paper-raised); border: 1px solid var(--t101-line); border-left: 3px solid var(--t101-brass); border-radius: var(--t101-radius); padding: var(--t101-sp-4); margin-bottom: var(--t101-sp-4); }
.t101-profile__entity h3 { font-family: var(--t101-font-display); font-size: var(--t101-fs-md); margin: 0 0 var(--t101-sp-2); color: var(--t101-evergreen); }
.t101-profile__verified { font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); color: var(--t101-ink-muted); }
.t101-profile__rel { list-style: none; margin: 0; padding: 0; }
.t101-profile__rel li { padding: var(--t101-sp-1) 0; }
.t101-profile__rel a { color: var(--t101-river); }
@media (max-width: 640px) { .t101-profile__row { grid-template-columns: 1fr; gap: var(--t101-sp-1); } }

/* --- Comparison tool (§6.3) --- */
.t101-compare { max-width: 1120px; margin: 0 auto; padding: var(--t101-sp-6) var(--t101-sp-4) var(--t101-sp-12); }
.t101-compare__form { display: flex; flex-wrap: wrap; gap: var(--t101-sp-4); align-items: flex-end; margin-bottom: var(--t101-sp-6); }
.t101-compare__form label { display: flex; flex-direction: column; gap: var(--t101-sp-1); font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); color: var(--t101-ink-muted); }
.t101-compare__form select {
	min-width: 240px; padding: var(--t101-sp-2) var(--t101-sp-3);
	font-family: var(--t101-font-body); font-size: var(--t101-fs-sm); color: var(--t101-ink);
	background: var(--t101-paper-raised); border: 1px solid var(--t101-line); border-radius: var(--t101-radius);
}
.t101-compare__opt { opacity: .7; }
.t101-compare__scroll { overflow-x: auto; }
.t101-compare__table { width: 100%; border-collapse: collapse; background: var(--t101-paper-raised); border: 1px solid var(--t101-line); }
.t101-compare__table th, .t101-compare__table td { padding: var(--t101-sp-3) var(--t101-sp-4); border: 1px solid var(--t101-line); vertical-align: top; text-align: left; font-size: var(--t101-fs-sm); }
.t101-compare__table thead th { background: var(--t101-evergreen); color: var(--t101-paper); font-family: var(--t101-font-display); font-size: var(--t101-fs-md); }
.t101-compare__table thead th a { color: var(--t101-paper); text-decoration: none; }
.t101-compare__table thead th a:hover { color: var(--t101-brass); }
.t101-compare__table tbody th { font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); letter-spacing: .03em; color: var(--t101-ink-muted); background: var(--t101-paper); white-space: nowrap; }
.t101-compare__table td > div { margin-bottom: var(--t101-sp-2); }
.t101-compare__no { color: var(--t101-ink-muted); font-style: italic; }

/* --- Suggest a correction (§6.2F) --- */
.t101-correction { background: var(--t101-evergreen-soft); border: 1px solid var(--t101-line); border-radius: var(--t101-radius); padding: var(--t101-sp-4); margin-top: var(--t101-sp-4); }
.t101-correction h3 { font-family: var(--t101-font-display); color: var(--t101-evergreen); margin: 0 0 var(--t101-sp-2); font-size: var(--t101-fs-md); }
.t101-correction__form { display: flex; flex-direction: column; gap: var(--t101-sp-3); }
.t101-correction__form label { display: flex; flex-direction: column; gap: var(--t101-sp-1); font-family: var(--t101-font-mono); font-size: var(--t101-fs-xs); color: var(--t101-ink-muted); }
.t101-correction__form select, .t101-correction__form textarea {
	font-family: var(--t101-font-body); font-size: var(--t101-fs-sm); color: var(--t101-ink);
	background: var(--t101-paper-raised); border: 1px solid var(--t101-line); border-radius: var(--t101-radius);
	padding: var(--t101-sp-2) var(--t101-sp-3);
}
.t101-correction__form button { align-self: flex-start; }
.t101-correction__ok { color: var(--t101-evergreen); font-weight: 600; }

/* --- Ghost button variant used by Registry controls --- */
/* S42: bare .t101-btn--ghost rules MOVED to components.css as the global light
   default (this file went conditional at S37 and stopped covering other sections). */

/* S46 mobile: profile tabs wrap so all six sections are visible (launch smoke finding 2) */
@media (max-width: 640px) {
	.t101-profile__tabs { flex-wrap: wrap; row-gap: 3px; }
	.t101-profile__tab { flex: 0 0 auto; }
}
