/* BBU – frontend component styles. Tokens can be overridden by the BBU template (tpl cassiopeia_bbu). */
.bbu {
  --bbu-navy: #081725;
  --bbu-navy-2: #10283b;
  --bbu-gold: #c4a25d;
  --bbu-gold-dark: #87672f;
  --bbu-cream: #f4efe5;
  --bbu-paper: #fffdf8;
  --bbu-text: #172535;
  --bbu-muted: #6f7a83;
  --bbu-border: #d8d1c3;
  --bbu-soft: #eee7d9;
  --bbu-ok: #2f5a33;
  --bbu-warn: #8a5208;
  --bbu-serif: Georgia, "Times New Roman", serif;
  color: var(--bbu-text);
  line-height: 1.55;
}
.bbu h1, .bbu h2, .bbu h3 { font-family: var(--bbu-serif); font-weight: 400; color: var(--bbu-text); line-height: 1.15; }
.bbu h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .2rem 0 .6rem; }
.bbu h2 { font-size: 1.6rem; margin: 1.6rem 0 .8rem; }
.bbu h3 { font-size: 1.2rem; margin: 0 0 .7rem; }
.bbu a { color: var(--bbu-navy-2); }
.bbu-eyebrow { font: 600 .72rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--bbu-gold-dark); }
.bbu-lead { font-size: 1.1rem; color: var(--bbu-muted); max-width: 52rem; }
.bbu-muted, .bbu-hint { color: var(--bbu-muted); }
.bbu-hint { font-size: .85rem; }
.bbu-block { display: block; }
.bbu-nowrap { white-space: nowrap; }
.bbu-gold { color: var(--bbu-gold) !important; }
.bbu-pagehead { margin-bottom: 1.5rem; }

/* buttons */
.bbu-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .7rem 1.2rem; border: 1px solid var(--bbu-navy); background: transparent; color: var(--bbu-navy); font: 600 .78rem/1 system-ui, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; border-radius: 0; }
.bbu-btn:hover, .bbu-btn:focus-visible { background: var(--bbu-navy); color: #fff; }
.bbu-btn--dark { background: var(--bbu-navy); color: #fff; }
.bbu-btn--dark:hover { background: var(--bbu-navy-2); }
.bbu-btn--gold { background: #e0c087; border-color: #e0c087; color: var(--bbu-navy); }
.bbu-btn--gold:hover, .bbu-btn--gold:focus-visible { background: var(--bbu-gold); border-color: var(--bbu-gold); color: var(--bbu-navy); }
.bbu-btn--small { padding: .4rem .7rem; font-size: .7rem; }
.bbu-btn--ghost { border-color: var(--bbu-border); color: var(--bbu-muted); }
.bbu-btn[disabled] { opacity: .5; cursor: not-allowed; }
.bbu a.bbu-btn { color: inherit; }
.bbu a.bbu-btn--dark { color: #fff; }

/* pills / statuses */
.bbu-pill { display: inline-block; border: 1px solid var(--bbu-border); border-radius: 999px; padding: .2rem .7rem; font: 600 .68rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: var(--bbu-paper); color: var(--bbu-text); }
.bbu-pill--gold { border-color: var(--bbu-gold); color: #765820; background: #fbf6ea; }
.bbu-pill--ok { border-color: #6f9a72; color: var(--bbu-ok); background: #eef5ee; }
.bbu-pill--warn { border-color: #d6a35a; color: var(--bbu-warn); background: #fff4e5; }
.bbu-status-bbu_verified, .bbu-status-lab_confirmed, .bbu-status-registered { border-color: #6f9a72; color: var(--bbu-ok); background: #eef5ee; }
.bbu-status-vet_diagnosed, .bbu-status-vet_suspected, .bbu-status-info_requested { border-color: #d6a35a; color: var(--bbu-warn); background: #fff4e5; }
.bbu-status-owner_reported, .bbu-status-submitted, .bbu-status-in_review, .bbu-status-bbu_review_pending { border-color: var(--bbu-gold); color: #765820; background: #fbf6ea; }
.bbu-status-rejected, .bbu-status-withdrawn { border-color: #c98a90; color: #8b1e2a; background: #fdf0f1; }
.bbu-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0; }

/* boxes */
.bbu-box { background: var(--bbu-paper); border: 1px solid var(--bbu-border); padding: 1.4rem 1.5rem; margin-bottom: 1rem; }
.bbu-box--owner { border-left: 4px solid var(--bbu-gold); }
.bbu-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.bbu-span-all { grid-column: 1 / -1; }
.bbu-callout { border-left: 4px solid var(--bbu-gold); background: var(--bbu-soft); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.bbu-quote { border-left: 3px solid var(--bbu-gold); padding-left: .9rem; color: var(--bbu-muted); }
.bbu-empty { padding: 2rem; text-align: center; border: 1px dashed var(--bbu-border); color: var(--bbu-muted); background: var(--bbu-paper); }
.bbu-notice { background: var(--bbu-navy); color: #f4efe5; padding: 1.25rem 1.5rem; border-left: 4px solid var(--bbu-gold); font-size: .95rem; align-self: center; }
.bbu-foot { margin-top: 2rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bbu-muted); text-align: center; }

/* key/value lists */
.bbu-kv { margin: 0; display: grid; grid-template-columns: 1fr; }
.bbu-kv > div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--bbu-soft); }
.bbu-kv dt { font-weight: 400; color: var(--bbu-muted); }
.bbu-kv dd { margin: 0; font-weight: 600; text-align: right; }


/* search + stats + tables */
.bbu-search { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 1rem; }
.bbu-search input[type=search] { flex: 1 1 18rem; min-width: 0; padding: .75rem 1rem; border: 1px solid var(--bbu-border); background: #fff; font-size: 1rem; }
.bbu-search select { padding: .7rem 2.2rem .7rem .7rem; border: 1px solid var(--bbu-border); background-color: #fff; }
.bbu-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.bbu-stats > div { background: var(--bbu-paper); border: 1px solid var(--bbu-border); padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.bbu-stats small { font: 600 .68rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--bbu-gold-dark); }
.bbu-stats strong { font: 400 2rem/1.2 var(--bbu-serif); }
.bbu-stats span { font-size: .8rem; color: var(--bbu-muted); }
.bbu-tablewrap { overflow-x: auto; border: 1px solid var(--bbu-border); background: var(--bbu-paper); }
.bbu-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.bbu-table th, .bbu-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--bbu-soft); text-align: left; vertical-align: top; }
.bbu-table thead th { background: var(--bbu-soft); font: 600 .7rem/1.3 system-ui, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--bbu-muted); }
.bbu-table tbody th small { display: block; font-weight: 400; color: var(--bbu-muted); }
.bbu-table code { background: none; color: var(--bbu-text); font-size: .88rem; }
.bbu-pagination { margin: 1rem 0; }

/* dog profile */
.bbu-dog__hero { background: radial-gradient(circle at 80% 0, #17354c 0, var(--bbu-navy) 60%); color: #f4efe5; padding: clamp(1.25rem, 4vw, 3rem); margin: 0 0 0; }
.bbu-dog__hero .bbu-eyebrow { color: #e0c087; }
.bbu-dog__hero h1 { color: #fff; }
.bbu-dog__head { display: grid; grid-template-columns: minmax(140px, 230px) 1fr; gap: clamp(1rem, 3vw, 2rem); margin-top: 1rem; }
@media (max-width: 640px) { .bbu-dog__head { grid-template-columns: 1fr; } .bbu-dog__photo { max-width: 260px; } }
.bbu-dog__photo { aspect-ratio: 4 / 5; border: 1px solid #314252; background: var(--bbu-navy-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; overflow: hidden; color: #9eabb5; font-size: .85rem; }
.bbu-dog__photo img { width: 100%; height: 100%; object-fit: cover; }
.bbu-dog__nophoto { font-size: 3.5rem; line-height: 1; }
.bbu-dog__sub { color: #c7d0d6; }
.bbu-dog__sub strong { color: #fff; }
.bbu-dog__hero .bbu-pill { background: transparent; color: #f4efe5; border-color: #596572; }
.bbu-dog__hero .bbu-pill--gold { color: #e0c087; border-color: #c4a25d; }
.bbu-dog__hero .bbu-pill--warn { color: #f0c27b; border-color: #b9893f; }
.bbu-dog__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: 1rem 0 0; }
.bbu-dog__facts > div { border: 1px solid #314252; padding: .7rem .9rem; }
.bbu-dog__facts dt { font: 600 .65rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #9eabb5; }
.bbu-dog__facts dd { margin: .2rem 0 0; font: 400 1.25rem/1.3 var(--bbu-serif); color: #fff; word-break: break-word; }

.bbu-tabs { display: flex; overflow-x: auto; gap: .25rem; border-bottom: 1px solid var(--bbu-border); background: var(--bbu-paper); margin-bottom: 1.5rem; padding: 0 .5rem; scrollbar-width: thin; }
.bbu-tabs a { padding: 1rem .9rem; text-decoration: none; color: var(--bbu-muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.bbu-tabs a[aria-selected=true] { color: var(--bbu-text); border-bottom-color: var(--bbu-gold); }
.bbu-tabs a:focus-visible { outline: 2px solid var(--bbu-gold); outline-offset: -2px; }
.bbu-panel { padding: 0 0 1rem; }
.bbu-panel > h2:first-child { margin-top: 0; }
.bbu-panelhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.bbu-panelhead h2 { margin-top: .2rem; }
.bbu-segmented { display: inline-flex; border: 1px solid var(--bbu-navy); }
.bbu-segmented a { padding: .6rem 1rem; text-decoration: none; color: var(--bbu-navy); }
.bbu-segmented a.is-active { background: var(--bbu-navy); color: #fff; }

/* pedigree */
.bbu-pedigree { display: grid; grid-template-columns: repeat(var(--bbu-gens), minmax(180px, 1fr)); gap: .6rem; overflow-x: auto; padding-bottom: .5rem; }
.bbu-pedigree__col { display: grid; grid-template-rows: auto repeat(var(--bbu-rows), minmax(64px, auto)); gap: .4rem; }
.bbu-pedigree__colhead { border-bottom: 1px solid var(--bbu-border); padding-bottom: .4rem; }
.bbu-pedigree__colhead strong { display: block; font-family: var(--bbu-serif); }
.bbu-pedigree__colhead small { color: var(--bbu-muted); font-size: .72rem; }
.bbu-pedigree__cell { display: flex; align-items: center; }
.bbu-anc { display: block; width: 100%; background: var(--bbu-paper); border: 1px solid var(--bbu-border); padding: .6rem .75rem; text-decoration: none; color: var(--bbu-text); }
a.bbu-anc:hover, a.bbu-anc:focus-visible { border-color: var(--bbu-gold); box-shadow: 0 2px 10px rgba(8, 23, 37, .08); }
.bbu-anc small { display: block; font: 600 .62rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--bbu-gold-dark); }
.bbu-anc strong { display: block; font-family: var(--bbu-serif); font-weight: 600; font-size: .95rem; }
.bbu-anc span { display: block; font-size: .75rem; color: var(--bbu-muted); }
.bbu-anc--self { border-left: 4px solid var(--bbu-gold); }
.bbu-anc--unknown { background: transparent; border-style: dashed; color: var(--bbu-muted); }
.bbu-anc--private { background: var(--bbu-soft); }
.bbu-relgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; }

/* health legend */
.bbu-legend { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.bbu-legend li { border: 1px solid var(--bbu-border); border-radius: 999px; padding: .2rem .7rem; font-size: .75rem; }

/* forms */
.bbu-form-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; margin: .8rem 0; }
.bbu-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .8rem; }
.bbu-form-row label, .bbu-form-grid label { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--bbu-text); }
.bbu input[type=text], .bbu input[type=date], .bbu input[type=email], .bbu input[type=number], .bbu input[type=datetime-local], .bbu input[type=password], .bbu input[type=file], .bbu select, .bbu textarea { padding: .6rem .7rem; border: 1px solid var(--bbu-border); background-color: #fff; font: inherit; font-weight: 400; color: var(--bbu-text); max-width: 100%; }
.bbu input:focus-visible, .bbu select:focus-visible, .bbu textarea:focus-visible { outline: 2px solid var(--bbu-gold); outline-offset: 1px; }
.bbu-inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }

/* lists */
.bbu-measurelist, .bbu-doclist { list-style: none; padding: 0; margin: 0; }
.bbu-measurelist li { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--bbu-soft); font-size: .9rem; }
.bbu-doclist li { padding: .4rem 0; border-bottom: 1px solid var(--bbu-soft); }
.bbu-doclist small { display: block; color: var(--bbu-muted); }
.bbu-timeline { list-style: none; padding: 0 0 0 1rem; margin: 0; border-left: 2px solid var(--bbu-soft); }
.bbu-timeline li { position: relative; padding: 0 0 .9rem .6rem; }
.bbu-timeline li::before { content: ""; position: absolute; left: -1.42rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--bbu-gold); border: 2px solid var(--bbu-paper); }
.bbu-timeline time { display: block; font-size: .75rem; color: var(--bbu-muted); }

/* chart (shared with backend) */
.bbu-chart { margin: 0 0 1rem; }
.bbu-chart svg { width: 100%; height: auto; max-height: 300px; }
.bbu-chart__grid { stroke: #e4dfd5; stroke-width: 1; }
.bbu-chart__label { font-size: 11px; fill: #6f7a83; font-family: system-ui, Arial, sans-serif; }
.bbu-chart__line { stroke: #c4a25d; stroke-width: 2.5; }
.bbu-chart__dot { fill: #081725; stroke: #fff; stroke-width: 1.5; }
.bbu-chart figcaption { font-size: .8rem; color: var(--bbu-muted); }
.bbu-chart-empty { color: var(--bbu-muted); font-style: italic; }

/* register wizard */
.bbu-register__head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; margin-bottom: 1.5rem; }
@media (max-width: 760px) { .bbu-register__head { grid-template-columns: 1fr; } }
.bbu-progress { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.bbu-progress li { flex: 1; height: 4px; background: var(--bbu-border); border-radius: 2px; }
.bbu-progress li.is-on { background: var(--bbu-gold); }
.bbu-wizard { background: var(--bbu-paper); border: 1px solid var(--bbu-border); box-shadow: 0 12px 30px rgba(8, 23, 37, .06); }
.bbu-step__body { padding: clamp(1.25rem, 3vw, 2.25rem); }
.bbu-step h2 { margin-top: .3rem; }
.bbu-wizard.is-enhanced .bbu-step { display: none; }
.bbu-wizard.is-enhanced .bbu-step.is-active { display: block; }
.bbu-wizard:not(.is-enhanced) .bbu-step + .bbu-step { border-top: 1px solid var(--bbu-soft); }
.bbu-wizard:not(.is-enhanced) [data-bbu-submit] { display: inline-flex !important; }
.bbu-step__foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem clamp(1.25rem, 3vw, 2.25rem); background: var(--bbu-cream); border-top: 1px solid var(--bbu-border); }
.bbu-step__foot [data-bbu-prev] { margin-right: auto; }
.bbu-fields .control-group { margin-bottom: 1.1rem; }
.bbu-fields .control-label label, .bbu-fields legend { font: 600 .78rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .04em; }
.bbu-fields input[type=text], .bbu-fields input[type=email], .bbu-fields select, .bbu-fields textarea { width: 100%; }
.bbu-fields .input-group { flex-wrap: nowrap; }
.bbu-fields .input-group > input { width: auto; flex: 1 1 auto; min-width: 0; }
.bbu select { padding-right: 2.2rem; }
.bbu-fields .form-control-feedback, .bbu-fields .invalid { color: #8b1e2a; }
.bbu-fields input.invalid, .bbu-fields select.invalid { border-color: #b02a37; }
.bbu-summary dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: .3rem 1rem; margin: 1rem 0; font-size: .9rem; }
.bbu-summary dt { color: var(--bbu-muted); }
.bbu-summary dd { margin: 0; word-break: break-word; }
.bbu-summary .bbu-summary__group { grid-column: 1 / -1; font: 600 .72rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--bbu-gold-dark); margin-top: .8rem; }
.bbu-summary dt.bbu-summary__group + dd { display: none; }

/* my dogs */
.bbu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.bbu-dogcard { display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem; background: var(--bbu-paper); border: 1px solid var(--bbu-border); text-decoration: none; color: var(--bbu-text); border-top: 3px solid var(--bbu-gold); }
.bbu-dogcard strong { font: 400 1.3rem/1.2 var(--bbu-serif); }
.bbu-dogcard .bbu-pill { align-self: flex-start; }
.bbu-dogcard:hover, .bbu-dogcard:focus-visible { box-shadow: 0 6px 20px rgba(8, 23, 37, .08); }
.bbu-application header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.bbu-application h3 { margin: 0; }
.bbu-note { border-left: 3px solid var(--bbu-border); padding: .4rem .8rem; margin: .6rem 0; }
.bbu-note p { margin: .2rem 0 0; }
.bbu-note small { color: var(--bbu-muted); }

@media (prefers-reduced-motion: reduce) { .bbu * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------------------------------------------------------------- v0.7 breeder workspace */
.bbu-flow { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: flow; }
.bbu-flow li { counter-increment: flow; }
.bbu-flow a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border: 1px solid var(--bbu-border); background: var(--bbu-paper); text-decoration: none; font-size: .85rem; color: var(--bbu-text); }
.bbu-flow a::before { content: counter(flow); display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--bbu-navy); color: #fff; font-size: .7rem; }
.bbu-flow li + li a { position: relative; }
.bbu-boxhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.bbu-boxhead h2 { margin: 0; }
.bbu-box > h2:first-child, .bbu-boxhead { margin-top: 0; margin-bottom: .6rem; }
.bbu-box--private { border-left: 4px solid var(--bbu-navy-2); }
.bbu-record { border: 1px solid var(--bbu-soft); background: #fff; margin: .5rem 0; padding: .1rem .9rem; }
.bbu-record > summary { cursor: pointer; padding: .6rem 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; list-style-position: outside; }
.bbu-record > summary small { color: var(--bbu-muted); }
.bbu-record[open] > summary { border-bottom: 1px solid var(--bbu-soft); margin-bottom: .6rem; }
.bbu-add { margin-top: .8rem; }
.bbu-add > summary { cursor: pointer; display: inline-block; padding: .55rem 1rem; border: 1px dashed var(--bbu-gold); color: var(--bbu-gold-dark); font: 600 .78rem/1.2 system-ui, Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.bbu-add[open] > summary { margin-bottom: .8rem; }
.bbu-callout--live { border-left-color: #2f7a52; background: #edf6f0; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.bbu-actions-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.bbu-check { flex-direction: row !important; align-items: center; gap: .4rem !important; font-weight: 400 !important; }
.bbu-option { position: relative; }
.bbu-option--selected { border: 2px solid var(--bbu-gold); box-shadow: 0 6px 18px rgba(196, 162, 93, .18); }
.bbu-option h3 { margin: .6rem 0 .2rem; }
.bbu-option details > summary { list-style: none; display: inline-flex; cursor: pointer; margin: .3rem .3rem .3rem 0; }
.bbu-checklist { list-style: none; padding: 0; margin: 0 0 .8rem; }
.bbu-checklist li { padding: .3rem 0 .3rem 1.6rem; position: relative; }
.bbu-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--bbu-ok); font-weight: 700; }
.bbu-checklist li.is-warn::before { content: "⚠"; color: var(--bbu-warn); }
.bbu-reviewlist { list-style: none; padding: 0; margin: 0; }
.bbu-reviewlist li { padding: .6rem 0; border-bottom: 1px solid var(--bbu-soft); }
.bbu-reviewlist li.is-due { background: #fff8ea; padding-left: .6rem; border-left: 3px solid var(--bbu-gold); }
.bbu-collar { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; background: var(--c, transparent); border: 1px solid rgba(0, 0, 0, .25); vertical-align: -2px; margin-right: .35rem; }
.bbu-table th small { display: block; font-weight: 400; color: var(--bbu-muted); }
.bbu-table input[type=text] { padding: .35rem .45rem; font-size: .88rem; }
.bbu-questionnaire { border: 1px solid var(--bbu-soft); padding: .8rem 1rem; display: grid; gap: .6rem; }
.bbu-questionnaire legend { font: 600 .78rem/1.4 system-ui, Arial, sans-serif; letter-spacing: .06em; padding: 0 .3rem; }
.bbu-devrow { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 14rem) minmax(0, 2fr); gap: .5rem; align-items: center; font-size: .88rem; }
@media (max-width: 640px) { .bbu-devrow { grid-template-columns: 1fr; } }

/* v0.7 litter table: keep inputs inside the cell so the action column stays visible */
.bbu-litter .bbu-table input[type="text"] { width: 100%; min-width: 7ch; box-sizing: border-box; }
.bbu-litter .bbu-table td:last-child { white-space: nowrap; }
.bbu-option .bbu-relation { display: block; margin-top: .25rem; }

/* ---------------------------------------------------------------- v0.8 */
.bbu-mini { display: flex; flex-wrap: wrap; gap: .1rem .9rem; margin: .35rem 0 0; font-size: .8rem; }
.bbu-mini div { display: flex; gap: .3rem; align-items: baseline; }
.bbu-mini dt { font-weight: 600; color: var(--bbu-muted); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.bbu-mini dd { margin: 0; }
.bbu-check { flex-direction: row !important; align-items: flex-start; gap: .55rem !important; font-weight: 500 !important; font-size: .9rem !important; }
.bbu-check input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--bbu-navy); flex: 0 0 auto; }
.bbu-application fieldset { border: 1px solid var(--bbu-border); }
.bbu-application legend, .bbu-eval-domain legend { font-family: var(--bbu-serif); font-size: 1.25rem; padding: 0 .4rem; float: none; width: auto; margin-bottom: .5rem; }
.bbu-stepno { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bbu-navy); color: #fff; font: 600 .8rem/1 system-ui, Arial, sans-serif; margin-right: .3rem; vertical-align: middle; }
.bbu-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; }
/* v0.10 membership type choice */
.bbu-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 0 1.75rem; }
.bbu-choice__card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .35rem 1rem; align-items: start; padding: 1.15rem 1.25rem; background: var(--bbu-paper); border: 1px solid var(--bbu-border); border-top: 3px solid var(--bbu-border); color: var(--bbu-text); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.bbu-choice__card:hover, .bbu-choice__card:focus-visible { border-color: var(--bbu-gold); box-shadow: 0 6px 18px rgba(8,23,37,.08); transform: translateY(-1px); }
.bbu-choice__card.is-active { border-color: var(--bbu-gold); border-top-color: var(--bbu-gold); background: #fffaf0; box-shadow: inset 0 0 0 1px var(--bbu-gold); }
.bbu-choice__icon { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bbu-navy); color: var(--bbu-gold-light, #e0c087); }
.bbu-choice__body strong { display: block; font-family: var(--bbu-serif); font-size: 1.15rem; font-weight: 600; margin-bottom: .2rem; }
.bbu-choice__body span { display: block; font-size: .9rem; color: var(--bbu-muted); line-height: 1.45; }
.bbu-choice__state { grid-column: 2; justify-self: start; margin-top: .35rem; font: 600 .72rem/1 system-ui, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #8a6a2e; }
.bbu-choice__card.is-active .bbu-choice__state { color: var(--bbu-navy); background: var(--bbu-gold); padding: .3rem .55rem; }
.bbu-choice__card.is-disabled { opacity: .5; filter: grayscale(1); cursor: not-allowed; background: var(--bbu-soft); }
.bbu-choice__card.is-disabled:hover { border-color: var(--bbu-border); box-shadow: none; transform: none; }
@media (max-width: 640px) { .bbu-choice { grid-template-columns: 1fr; } }
.bbu-notes { list-style: none; padding: 0; margin: .8rem 0; }
.bbu-notes li { border-left: 3px solid var(--bbu-gold); background: var(--bbu-soft); padding: .6rem .9rem; margin-bottom: .5rem; font-size: .9rem; }
.bbu-list { list-style: none; padding: 0; margin: 0; }
.bbu-list li { padding: .6rem 0; border-bottom: 1px solid var(--bbu-border); }
.bbu-code { font: 700 1.15rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; background: #fff; border: 1px dashed var(--bbu-gold); padding: .25rem .6rem; }
.bbu-callout--warn { border-left-color: #b4632a; background: #fdf1e7; }
.bbu-xray { margin-bottom: .9rem; padding: .7rem .9rem; }
.bbu-xray header { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.bbu-flow--steps { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: .4rem 0 .6rem; counter-reset: s; }
.bbu-flow--steps li { counter-increment: s; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; padding: .3rem .6rem; border: 1px solid var(--bbu-border); background: var(--bbu-paper); color: var(--bbu-muted); }
.bbu-flow--steps li::before { content: counter(s) " · "; font-weight: 700; }
.bbu-flow--steps li.is-done { border-color: #6f9a72; color: var(--bbu-ok); background: #eef5ee; }
.bbu-flow--steps li.is-current { border-color: var(--bbu-gold); color: var(--bbu-navy); background: #fbf6ea; font-weight: 700; }
.bbu-eval__score { font: 400 2.6rem/1.1 var(--bbu-serif); margin: .3rem 0; color: var(--bbu-navy); }
.bbu-eval__score small { font-size: 1rem; color: var(--bbu-muted); }
.bbu-eval-domain { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .6rem; border: 1px solid var(--bbu-border); padding: .6rem .8rem .8rem; margin: 0; }
.bbu-eval-domain legend { font-size: 1rem; }
#bbu-health-add details.bbu-add { margin-bottom: .5rem; }
.bbu-status-vet_documented { border-color: #5b7189; color: #17324c; background: #eef2f6; }
.bbu-status-approved { border-color: #6f9a72; color: var(--bbu-ok); background: #eef5ee; }
.bbu-status-submitted, .bbu-status-in_review { border-color: var(--bbu-gold); color: #765820; background: #fbf6ea; }
.bbu-status-rejected, .bbu-status-withdrawn { border-color: #c98b8b; color: #8b1e2a; background: #fdf0f1; }

/* ---------------------------------------------------------------- v0.9 BBU workspace */
.bbu-ws__pagehead { margin-bottom: 1.25rem; padding-bottom: .9rem; border-bottom: 1px solid var(--bbu-border); }
.bbu-ws__pagehead h1 { margin: .2rem 0 .35rem; }
.bbu-ws__me { margin: 0; font-size: .9rem; color: var(--bbu-muted, #5b6670); }
.bbu-ws__me strong { color: var(--bbu-text); }
.bbu-ws__me strong::after { content: " · "; white-space: pre; font-weight: 400; color: var(--bbu-muted, #5b6670); }
.bbu-ws__h--first { margin-top: 0; }
.bbu-ws__layout { display: grid; grid-template-columns: 230px 1fr; gap: 1.25rem; align-items: start; }
.bbu-ws__nav { position: sticky; top: 1rem; background: var(--bbu-paper); border: 1px solid var(--bbu-border); }
.bbu-ws__nav ul { list-style: none; margin: 0; padding: .4rem 0; }
.bbu-ws__nav a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 1rem; color: var(--bbu-text); text-decoration: none; border-left: 4px solid transparent; font-size: .92rem; }
.bbu-ws__nav a:hover, .bbu-ws__nav a:focus-visible { background: var(--bbu-soft); }
.bbu-ws__nav a.is-active { border-left-color: var(--bbu-gold); background: #fbf6ea; font-weight: 600; }
.bbu-ws__nav em { font-style: normal; min-width: 1.6rem; text-align: center; padding: .1rem .45rem; border-radius: 999px; background: var(--bbu-navy); color: #fff; font-size: .72rem; font-weight: 700; }
.bbu-ws__main { min-width: 0; }
.bbu-ws__h { font-size: 1.35rem; margin: 1.2rem 0 .6rem; }
.bbu-ws__main > .bbu-ws__h:first-child { margin-top: 0; }
.bbu-ws__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.bbu-ws__tile { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; background: var(--bbu-paper); border: 1px solid var(--bbu-border); border-top: 3px solid var(--bbu-gold); color: var(--bbu-text); text-decoration: none; }
a.bbu-ws__tile:hover, a.bbu-ws__tile:focus-visible { border-color: var(--bbu-navy); box-shadow: 0 6px 18px -12px rgba(8, 23, 37, .5); }
.bbu-ws__tile.is-alert { border-top-color: #b4632a; }
.bbu-ws__tile-label { font: 600 .7rem/1.3 system-ui, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--bbu-muted); }
.bbu-ws__tile-value { font: 400 2.1rem/1 var(--bbu-serif); color: var(--bbu-navy); }
.bbu-ws__tiles--small .bbu-ws__tile-value { font-size: 1.5rem; }
.bbu-ws__filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.bbu-ws__filter input[type=search] { min-width: min(100%, 18rem); padding: .55rem .7rem; border: 1px solid var(--bbu-border); background: #fff; font: inherit; }
.bbu-ws__record { display: flex; gap: 1.1rem; align-items: center; padding: 1rem 1.2rem; margin-bottom: 1rem; background: var(--bbu-paper); border: 1px solid var(--bbu-border); }
.bbu-ws__record h2 { margin: .2rem 0 .4rem; }
.bbu-ws__record p { margin: 0 0 .4rem; }
.bbu-ws__photo { flex: 0 0 96px; height: 110px; display: flex; align-items: center; justify-content: center; background: #10283b; color: #9eabb5; font-size: 2rem; overflow: hidden; }
.bbu-ws__photo img { width: 100%; height: 100%; object-fit: cover; }
.bbu-ws__split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1rem; align-items: start; }
.bbu-ws__decide { border-top: 1px solid var(--bbu-border); margin-top: 1rem; padding-top: .8rem; }
.bbu-ws__decide h4 { margin: 0; font-family: var(--bbu-serif); font-weight: 400; font-size: 1.1rem; }
.bbu-ws__result { font-size: 1.5rem; margin: .2rem 0 .5rem; }
.bbu-ws__mini { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 14rem; }
.bbu-ws__mini textarea { width: 100%; padding: .4rem; border: 1px solid var(--bbu-border); font: inherit; font-size: .85rem; }
.bbu-ws__users, .bbu-ws__fns { border: 1px solid var(--bbu-border); padding: .6rem .9rem .8rem; margin: 0; display: grid; gap: .35rem; }
.bbu-ws__fns { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bbu-ws__users legend, .bbu-ws__fns legend { font-weight: 600; font-size: .85rem; padding: 0 .3rem; float: none; width: auto; }
.bbu-fnlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.bbu-fnlist li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.bbu-fnlist small { color: var(--bbu-muted); }
.bbu-box--ok { border-left: 4px solid #6f9a72; }
.bbu-btn--danger { border-color: #9b2c2c; color: #9b2c2c; }
.bbu-btn--danger:hover, .bbu-btn--danger:focus-visible { background: #9b2c2c; color: #fff; }
.bbu-actions--stack { flex-direction: column; align-items: stretch; }
.bbu-diff th, .bbu-diff td { background: #fff4e5; }
.bbu-table--compact th, .bbu-table--compact td { padding: .45rem .6rem; font-size: .88rem; }
.bbu-kv--wide > div { display: grid; grid-template-columns: minmax(10rem, 40%) 1fr; }
.bbu-back { margin: 0 0 .6rem; font-size: .9rem; }
.bbu-small { font-size: .8rem; }
.bbu-mt { margin-top: .5rem; }
@media (max-width: 900px) {
  .bbu-ws__layout, .bbu-ws__split { grid-template-columns: 1fr; }
  .bbu-ws__nav { position: static; }
  .bbu-ws__nav ul { display: flex; flex-wrap: wrap; padding: .3rem; }
  .bbu-ws__nav a { border-left: 0; border-bottom: 3px solid transparent; padding: .45rem .7rem; }
  .bbu-ws__nav a.is-active { border-bottom-color: var(--bbu-gold); }
}

/* v0.10 breeding approval */
.bbu-ws__card { background: var(--bbu-paper); border: 1px solid var(--bbu-border); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.bbu-ws__card > h3 { margin-top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.bbu-ws__card .bbu-ws__h { margin: .2rem 0 .5rem; }
.bbu-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .6rem 1rem; margin: .8rem 0 0; }
.bbu-facts dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bbu-muted); }
.bbu-facts dd { margin: .15rem 0 0; font-weight: 600; }
.bbu-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.bbu-pill--danger { border-color: #c47c6f; color: #8f2f22; background: #fbefec; }
.bbu-table tr.is-current td { background: #fbf6ea; }
.bbu-ws__publish { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bbu-border); }
.bbu-br-status { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border: 1px solid var(--bbu-border); border-left: 4px solid var(--bbu-gold); background: var(--bbu-paper); margin-bottom: 1rem; }
.bbu-br-status strong { font-family: var(--bbu-serif); font-size: 1.2rem; font-weight: 400; }
.bbu-br-status.is-none { border-left-color: var(--bbu-border); }
.bbu-br-meter { display: inline-flex; gap: .25rem; }
.bbu-br-meter i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--bbu-gold); display: inline-block; }
.bbu-br-meter i.is-used { background: var(--bbu-gold); }
.bbu-br-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .bbu-br-levels { grid-template-columns: 1fr; } }
.bbu-br-rules { list-style: none; padding: 0; margin: .6rem 0 1rem; }
.bbu-br-rules li { padding: .45rem 0; border-bottom: 1px dashed var(--bbu-border); font-size: .92rem; }
.bbu-br-rules .bbu-pill { margin-right: .35rem; }
/* v0.10 consents */
.bbu-consents { list-style: none; margin: 0; padding: 0; }
.bbu-consent { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .75rem 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--bbu-border); }
.bbu-consent:last-child { border-bottom: 0; }
.bbu-consent__main { flex: 1 1 22rem; }
.bbu-consent__main strong { display: block; margin-bottom: .3rem; }
.bbu-consent details { margin-top: .4rem; font-size: .88rem; color: var(--bbu-muted); }
.bbu-consent details summary { cursor: pointer; color: var(--bbu-text); }
.bbu-consent-dog > summary { cursor: pointer; display: flex; align-items: center; gap: .6rem; list-style: none; }
.bbu-consent-dog > summary::-webkit-details-marker { display: none; }
.bbu-consent-dog > summary::before { content: "▸"; color: var(--bbu-gold); }
.bbu-consent-dog[open] > summary::before { content: "▾"; }
.bbu-consent-dog[open] > summary { margin-bottom: .5rem; }

/* v0.10.1: owner area – add / replace the profile photo */
.bbu-photo-upload { display: grid; grid-template-columns: 96px 1fr; gap: 1rem 1.25rem; align-items: start; padding: 1rem 0 1.25rem; margin-bottom: 1rem; border-bottom: 1px solid #d8d1c3; }
.bbu-photo-upload__preview { width: 96px; aspect-ratio: 4 / 5; border: 1px solid #c9c0ae; background: #eee7d9; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #8a8170; font-size: 1.4rem; }
.bbu-photo-upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.bbu-photo-upload__preview.is-new { outline: 2px solid var(--bbu-gold, #c4a25d); outline-offset: 2px; }
.bbu-photo-upload__body { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; min-width: 0; }
.bbu-photo-upload__body input[type="file"] { max-width: 100%; }
.bbu-photo-upload__body .bbu-hint { max-width: 60ch; }
@media (max-width: 480px) { .bbu-photo-upload { grid-template-columns: 72px 1fr; } .bbu-photo-upload__preview { width: 72px; } }

/* v0.10.1: choose the photo section before upload (photocrop.js) */
.bbu-crop { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #d8d1c3; border-top: 3px solid var(--bbu-gold, #c4a25d); background: #fffdf8; color: #14212d; box-shadow: 0 24px 60px rgba(8, 23, 37, .35); overflow: auto; }
.bbu-crop::backdrop { background: rgba(8, 23, 37, .72); }
.bbu-crop__inner { display: grid; gap: .8rem; padding: 1.25rem; margin: 0; }
.bbu-crop__title { font: 400 1.4rem/1.2 Georgia, "Times New Roman", serif; margin: 0; }
.bbu-crop__hint { margin: 0; font-size: .88rem; color: #55606a; }
.bbu-crop__stage { position: relative; width: min(100%, 360px); justify-self: center; background: #eee7d9; overflow: hidden; cursor: grab; touch-action: none; user-select: none; }
.bbu-crop__stage.is-dragging { cursor: grabbing; }
.bbu-crop__stage:focus-visible { outline: 2px solid var(--bbu-gold, #c4a25d); outline-offset: 3px; }
.bbu-crop__canvas { display: block; width: 100%; height: 100%; }
.bbu-crop__frame { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
  background: linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
              linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% - .5px), rgba(255,255,255,.45) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% - .5px), rgba(255,255,255,.45) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.bbu-crop__tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.bbu-crop__zoom { display: flex; align-items: center; gap: .6rem; flex: 1 1 220px; font-size: .85rem; font-weight: 600; }
.bbu-crop__range { flex: 1; accent-color: var(--bbu-gold, #c4a25d); min-height: 44px; }
.bbu-crop__size { margin: 0; font-size: .8rem; color: #55606a; font-variant-numeric: tabular-nums; }
.bbu-crop__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.bbu-crop .bbu-btn--ghost { background: transparent; border: 1px solid #8a8170; color: #14212d; }
.bbu-crop-thumb { display: block; width: 96px; aspect-ratio: 4 / 5; object-fit: cover; margin-top: .5rem; border: 1px solid #c9c0ae; }

/* v0.10.1: team e-mail preference (workspace dashboard) */
.bbu-teammail { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.5rem; }
.bbu-teammail fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; align-items: center; }
.bbu-teammail legend { width: 100%; margin-bottom: .4rem; float: none; font-size: .9rem; }

/* v0.10.1: membership page creates the user account – spam trap stays invisible */
.bbu-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* v0.11.0: privacy consent page (shown before anything else until the user agrees) */
.bbu-consent { max-width: 52rem; margin: 2rem auto 3rem; }
.bbu-consent h1 { margin: .3rem 0 .6rem; text-align: left; }
.bbu-consent__policy { max-height: 55vh; overflow-y: auto; margin: 1.4rem 0; padding: 1.1rem 1.3rem; background: var(--bbu-paper, #fffdf8); border: 1px solid var(--bbu-border); border-top: 3px solid var(--bbu-gold); }
.bbu-consent__policy h2 { font-size: 1.25rem; margin-top: 0; }
.bbu-consent__policy:focus-visible { outline: 2px solid var(--bbu-gold); outline-offset: 2px; }
.bbu-consent__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0 .6rem; }
.bbu-consent__actions .bbu-btn { padding: .85rem 1.6rem; }
