/*
 * The Accountancy SubHub — functional styles (Phases 1–2).
 * Mobile-first, minimal. Override the custom properties from Breakdance global
 * styles to theme. Final design is Phase 6.
 */
.subhub {
	--subhub-accent: #1d4ed8;
	--subhub-accent-contrast: #fff;
	--subhub-text: inherit;
	--subhub-muted: #5b6472;
	--subhub-border: #c9ced6;
	--subhub-surface: #f6f7f9;
	--subhub-error: #b42318;
	--subhub-error-bg: #fef3f2;
	--subhub-success: #067647;
	--subhub-success-bg: #ecfdf3;
	--subhub-info-bg: #eff4ff;
	--subhub-radius: 6px;
	--subhub-gap: 1rem;
	color: var(--subhub-text);
	max-width: 46rem;
	line-height: 1.5;
}
.subhub *,
.subhub *::before,
.subhub *::after { box-sizing: border-box; }
/* Links use the accent, not the inherited theme link colour (the site's gold #bf9761
   is 2.7:1 on white, below WCAG AA). The theme's a:hover outranks single-class rules,
   so hover states are pinned here too. */
.subhub a:not([class]),
.subhub a:not([class]):hover,
.subhub .subhub-link:hover,
.subhub .subhub-dashboard__logout,
.subhub .subhub-dashboard__logout:hover,
.subhub .subhub-chip:hover,
.subhub .subhub-button--secondary:hover { color: var(--subhub-accent); }
.subhub .subhub-button:not(.subhub-button--secondary):hover { color: var(--subhub-accent-contrast); }
.subhub .subhub-tabs a,
.subhub .subhub-pagination a,
.subhub .subhub-card,
.subhub .subhub-card:hover { color: inherit; }

/* Notices */
.subhub-notice { padding: .75rem 1rem; border-radius: var(--subhub-radius); margin: 0 0 var(--subhub-gap); border-left: 4px solid var(--subhub-accent); background: var(--subhub-info-bg); }
.subhub-notice--success { border-color: var(--subhub-success); background: var(--subhub-success-bg); }
.subhub-notice--error { border-color: var(--subhub-error); background: var(--subhub-error-bg); }

/* Forms */
.subhub-form { margin: 0 0 var(--subhub-gap); }
.subhub-field { margin: 0 0 var(--subhub-gap); }
.subhub-field > label,
.subhub-field legend,
.subhub-label { display: block; font-weight: 600; margin-bottom: .25rem; }
.subhub-field input[type="text"],
.subhub-field input[type="email"],
.subhub-field input[type="password"],
.subhub-field input[type="tel"],
.subhub-field input[type="url"],
.subhub-field input[type="number"],
.subhub-field select,
.subhub-field textarea {
	display: block; width: 100%; padding: .625rem .75rem; font: inherit; color: inherit;
	border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); background: #fff;
	min-height: 2.75rem;
}
.subhub-field input:focus-visible,
.subhub-field select:focus-visible,
.subhub-field textarea:focus-visible,
.subhub-button:focus-visible,
.subhub-tabs a:focus-visible { outline: 3px solid var(--subhub-accent); outline-offset: 2px; }
.subhub-field--error input,
.subhub-field--error select,
.subhub-field--error textarea { border-color: var(--subhub-error); }
.subhub-field--group { border: 0; padding: 0; margin: 0 0 var(--subhub-gap); min-width: 0; }
.subhub-field--checkbox label { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.subhub-help { margin: .25rem 0 0; font-size: .875em; color: var(--subhub-muted); }
.subhub-error { margin: .25rem 0 0; font-size: .875em; color: var(--subhub-error); font-weight: 600; }
.subhub-required { color: var(--subhub-error); }
.subhub-options { display: grid; gap: .5rem; }
.subhub-options--grid { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.subhub-option { display: flex; gap: .5rem; align-items: center; min-height: 2.25rem; }
.subhub-group { border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); padding: 1rem; margin: 0 0 var(--subhub-gap); min-width: 0; }
.subhub-group > legend { font-weight: 700; padding: 0 .25rem; }
.subhub-readonly { margin: 0; padding: .5rem 0; }
.subhub-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.subhub-button {
	display: inline-block; padding: .7rem 1.25rem; border: 2px solid var(--subhub-accent); border-radius: var(--subhub-radius);
	background: var(--subhub-accent); color: var(--subhub-accent-contrast); font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer; min-height: 2.75rem;
}
.subhub-button--secondary { background: transparent; color: var(--subhub-accent); }
.subhub-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.subhub-inline-form { margin: 0; }

/* Links, misc */
.subhub-links { list-style: none; padding: 0; margin: var(--subhub-gap) 0; }
.subhub-links li { margin: .25rem 0; }
.subhub-muted { color: var(--subhub-muted); }
.subhub-badge,
.subhub-status { display: inline-block; padding: .125rem .5rem; border-radius: 999px; background: var(--subhub-surface); border: 1px solid var(--subhub-border); font-size: .875em; font-weight: 600; }
.subhub-status--approved { background: var(--subhub-success-bg); border-color: var(--subhub-success); }
.subhub-status--hidden { background: var(--subhub-error-bg); border-color: var(--subhub-error); }
.subhub-checklist { margin: 0 0 var(--subhub-gap); padding-left: 1.25rem; }

/* Chooser */
.subhub-chooser { display: grid; gap: var(--subhub-gap); }
.subhub-card { display: block; padding: 1.25rem; border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); text-decoration: none; color: inherit; }
.subhub-card strong { display: block; margin-bottom: .25rem; }

/* Dashboard */
.subhub-dashboard__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: var(--subhub-gap); }
.subhub-dashboard__greeting { margin: 0; font-weight: 600; }
.subhub-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--subhub-border); margin-bottom: var(--subhub-gap); }
.subhub-tabs a { padding: .6rem .8rem; text-decoration: none; color: inherit; border-bottom: 3px solid transparent; }
.subhub-tabs a[aria-current="page"] { border-color: var(--subhub-accent); font-weight: 700; }
.subhub-panel { padding: 1rem; border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); margin-bottom: var(--subhub-gap); }
.subhub-panel h2 { margin-top: 0; font-size: 1.15em; }
.subhub-dl { display: grid; grid-template-columns: 1fr; gap: .25rem 1rem; margin: 0 0 var(--subhub-gap); }
.subhub-dl dt { font-weight: 600; }
.subhub-dl dd { margin: 0 0 .5rem; }
.subhub-private { border-top: 1px dashed var(--subhub-border); padding-top: var(--subhub-gap); }
.subhub-account-links { display: flex; gap: 1rem; }

@media (min-width: 40em) {
	.subhub-chooser { grid-template-columns: 1fr 1fr; }
	.subhub-dl { grid-template-columns: 12rem 1fr; }
	.subhub-dl dd { margin: 0; }
}

/* Screen-reader-only text (not every theme defines it). */
.subhub .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Directory (Phase 2) — mobile first */
.subhub--wide { max-width: 72rem; }
.subhub-directory { display: grid; gap: var(--subhub-gap); }
.subhub-filters { border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); background: var(--subhub-surface); }
.subhub-filters__toggle { padding: .75rem 1rem; font-weight: 700; cursor: pointer; min-height: 2.75rem; }
.subhub-filters__form { padding: 0 1rem 1rem; margin: 0; }
.subhub-filter-group { border-top: 1px solid var(--subhub-border); padding: .5rem 0; margin: 0 0 .5rem; }
.subhub-filter-group > summary { font-weight: 600; cursor: pointer; padding: .375rem 0; min-height: 2.25rem; }
.subhub-filter-group .subhub-field--group { margin: .5rem 0 0; }
.subhub-count { display: inline-block; margin-left: .375rem; padding: 0 .5rem; border-radius: 999px; background: var(--subhub-accent); color: var(--subhub-accent-contrast); font-size: .8em; font-weight: 600; }
.subhub-link { align-self: center; color: var(--subhub-accent); }

.subhub-results__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: var(--subhub-gap); }
.subhub-results__count { margin: 0; font-size: 1.25em; }
.subhub-sort { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.subhub-sort select { padding: .5rem; font: inherit; border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); min-height: 2.75rem; background: #fff; }
.subhub-sort .subhub-button { padding: .45rem .9rem; }

.subhub-chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 var(--subhub-gap); align-items: center; }
.subhub-chip { display: inline-flex; gap: .375rem; align-items: center; padding: .375rem .75rem; border: 1px solid var(--subhub-accent); border-radius: 999px; color: var(--subhub-accent); text-decoration: none; min-height: 2.25rem; }
.subhub-chip:focus-visible, .subhub-link:focus-visible, .subhub-card a:focus-visible, .subhub-pagination a:focus-visible { outline: 3px solid var(--subhub-accent); outline-offset: 2px; }
.subhub-chip__x { font-weight: 700; }

.subhub-cards { list-style: none; padding: 0; margin: 0 0 var(--subhub-gap); display: grid; gap: var(--subhub-gap); }
.subhub-card__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .75rem; }
.subhub-card__name { margin: 0; font-size: 1.15em; }
.subhub-card__trading { margin: .125rem 0 0; color: var(--subhub-muted); }
.subhub-card__meta { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .925em; }
.subhub-card__quals, .subhub-card__excerpt { margin: .5rem 0 0; }
.subhub-card__excerpt { color: var(--subhub-muted); }
.subhub-card__more { margin: .75rem 0 0; font-weight: 600; }
.subhub-tags { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .375rem; }
.subhub-tags li { padding: .125rem .5rem; border-radius: var(--subhub-radius); background: var(--subhub-surface); border: 1px solid var(--subhub-border); font-size: .875em; }
.subhub-tags__more { font-style: italic; }
.subhub-badge--unavailable { background: var(--subhub-surface); color: var(--subhub-muted); }
.subhub-badge--available { background: var(--subhub-success-bg); border-color: var(--subhub-success); }
.subhub-empty { padding: 1.5rem 1rem; border: 1px dashed var(--subhub-border); border-radius: var(--subhub-radius); text-align: center; }

.subhub-pagination ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .375rem; justify-content: center; }
.subhub-pagination a, .subhub-pagination [aria-current] { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .75rem; border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); text-decoration: none; color: inherit; }
.subhub-pagination [aria-current] { background: var(--subhub-accent); border-color: var(--subhub-accent); color: var(--subhub-accent-contrast); font-weight: 700; }
.subhub-pagination__gap { align-self: center; padding: 0 .25rem; }

.subhub-back { margin: 0 0 var(--subhub-gap); }
.subhub-profile__name { margin: 0; }
.subhub-profile__trading { margin: .25rem 0 0; color: var(--subhub-muted); font-size: 1.1em; }
.subhub-profile__section { margin: 1.5rem 0 0; }
.subhub-profile__section h2 { font-size: 1.15em; margin: 0 0 .5rem; }
.subhub-profile__contact { padding: 1rem; border: 1px solid var(--subhub-border); border-radius: var(--subhub-radius); background: var(--subhub-surface); }

@media (min-width: 60em) {
	.subhub-directory { grid-template-columns: 18rem 1fr; align-items: start; }
}
