/* ══════════════════════════════════════════════════════
   STYLES — Edit colours, fonts, sizes here
   ══════════════════════════════════════════════════════ */
:root {
  --gd: #1a4a2e;
  --gm: #2d7a4f;
  --gl: #4caf6f;
  --gp: #e8f5ec;
  --hbg: #e8f0ff;
  --hbd: #3a6bc4;
  --mbg: #fff3e0;
  --mbd: #e67e22;
  --td: #1a2e1a;
  --tm: #4a5a4a;
  --tl: #7a8a7a;
  --bdr: #c8d8c8;
  --sh: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shl: 0 4px 22px rgba(0, 0, 0, 0.14);
  --r: 8px;
  --rl: 12px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family: "Georgia", serif;
  background: #faf8f2;
  color: var(--td);
  font-size: 14px;
  display: flex;
  flex-direction: column;
}
/* Header */
header {
  background: var(--gd);
  color: #fff;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  min-height: 52px;
  flex-wrap: wrap;
}
.hbrand {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.hico {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.hbrand h1 {
  font-size: 13px;
  font-weight: normal;
  line-height: 1.3;
}
.hbrand p {
  font-size: 9px;
  opacity: 0.6;
  font-family: sans-serif;
  margin-top: 1px;
  letter-spacing: 0.5px;
}
.hnav {
  display: flex;
  align-items: stretch;
}
.nb {
  padding: 0 13px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.nb:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.nb.act {
  color: #fff;
  border-bottom-color: var(--gl);
}
.hacts {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.18);
}
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.bw {
  background: #fff;
  color: var(--gd);
}
.bw:hover {
  background: var(--gp);
}
.bo {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.bo:hover {
  background: rgba(255, 255, 255, 0.1);
}
.bg {
  background: var(--gm);
  color: #fff;
}
.bg:hover {
  background: var(--gl);
}
.bb {
  background: var(--hbd);
  color: #fff;
}
.bd {
  background: #f3f4f6;
  color: #555;
  border: 1px solid #ddd;
}
.bsm {
  padding: 4px 9px;
  font-size: 11px;
}
/* Layout */
.shell {
  display: flex;
  flex: 1;
  overflow: auto;
  min-height: 0;
  min-width: 0;
}
/* Sidebar */
aside {
  width: 260px;
  min-width: 220px;
  max-width: 260px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--bdr);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.sbh {
  padding: 9px 12px;
  background: var(--gp);
  border-bottom: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sbh h3 {
  font-size: 11px;
  font-family: sans-serif;
  color: var(--tm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 700;
}
.sbs {
  padding: 7px 10px;
  border-bottom: 1px solid var(--bdr);
}
.sbs input {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  font-family: sans-serif;
  font-size: 12px;
  color: var(--td);
}
.sbs input:focus {
  outline: none;
  border-color: var(--gm);
}
.sbf {
  padding: 5px 10px;
  border-bottom: 1px solid var(--bdr);
  display: flex;
  gap: 3px;
}
.sf {
  flex: 1;
  padding: 3px;
  border: 1px solid var(--bdr);
  border-radius: 4px;
  background: #fafafa;
  font-family: sans-serif;
  font-size: 10px;
  cursor: pointer;
  color: var(--tm);
  font-weight: 500;
  transition: all 0.1s;
}
.sf.on {
  background: var(--gm);
  color: #fff;
  border-color: var(--gm);
}
.alist {
  flex: 1;
  overflow-y: auto;
}
.ai {
  padding: 9px 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
}
.ai:hover {
  background: var(--gp);
}
.ai.on {
  background: var(--gp);
  border-left: 3px solid var(--gm);
}
.av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bh {
  background: var(--hbg);
}
.bm {
  background: var(--mbg);
}
.al {
  background: #dcfce7;
}
.ax {
  background: #f3e8ff;
}
.ain {
  flex: 1;
  min-width: 0;
}
.anm {
  font-size: 12px;
  font-weight: bold;
  color: var(--td);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amt {
  font-size: 10px;
  font-family: sans-serif;
  color: var(--tl);
  margin-top: 1px;
}
.aac {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.1s;
}
.ai:hover .aac {
  opacity: 1;
}
.ib {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: transparent;
}
.ib:hover {
  background: rgba(0, 0, 0, 0.08);
}
/* Pages */
.page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.page.on {
  display: flex;
}
/* Cards */
.card {
  background: #fff;
  border-radius: var(--rl);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh);
  overflow: hidden;
}
.ch {
  padding: 10px 15px;
  border-bottom: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gp);
}
.ch h2 {
  font-size: 13px;
  color: var(--gd);
}
.cb {
  padding: 15px;
}
/* Stats */
.srow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sc {
  flex: 1;
  min-width: 80px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  padding: 10px 12px;
  box-shadow: var(--sh);
}
.sv {
  font-size: 18px;
  font-weight: bold;
  color: var(--gd);
  line-height: 1.1;
}
.sl {
  font-size: 9px;
  font-family: sans-serif;
  color: var(--tl);
  margin-top: 3px;
}
/* Tabs */
.mtabs {
  display: flex;
  border-bottom: 2px solid var(--bdr);
}
.mt {
  padding: 7px 13px;
  border: none;
  background: transparent;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--tl);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.mt:hover {
  color: var(--gm);
}
.mt.on {
  color: var(--gm);
  border-bottom-color: var(--gm);
}
/* Photos */
.aphoto {
  width: 100%;
  max-width: 150px;
  border-radius: var(--rl);
  border: 2px solid var(--bdr);
  object-fit: cover;
  aspect-ratio: 1;
  display: block;
}
.aphold {
  width: 150px;
  height: 150px;
  border-radius: var(--rl);
  border: 2px dashed var(--bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  background: #f9f9f9;
  color: #ccc;
}
.pedph {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--bdr);
  vertical-align: middle;
  margin-right: 3px;
}
/* Pedigree boxes */
.pb {
  border-radius: var(--r);
  border: 1.5px solid;
  padding: 7px 10px;
  transition: all 0.15s;
  cursor: default;
}
.pb.lk {
  cursor: pointer;
}
.pb.lk:hover {
  transform: translateX(2px);
  box-shadow: var(--sh);
}
.pb.g1 {
  border-color: var(--gm);
  background: var(--gp);
  padding: 10px 12px;
}
.pb.g2s,
.pb.g3ss,
.pb.g3ds {
  border-color: #3a6bc4;
  background: #eef3ff;
}
.pb.g2d,
.pb.g3sd,
.pb.g3dd {
  border-color: #8e44ad;
  background: #f5eeff;
}
.pb.mt2 {
  opacity: 0.38;
  border-style: dashed;
  background: #fafafa;
}
.plbl {
  font-size: 8px;
  font-family: sans-serif;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 2px;
}
.pnm {
  font-size: 12px;
  font-weight: bold;
  color: var(--td);
}
.pid2 {
  font-size: 9px;
  font-family: sans-serif;
  color: var(--tm);
  margin-top: 1px;
}
.pdb {
  font-size: 9px;
  font-family: sans-serif;
  color: var(--tl);
  margin-top: 1px;
}
.ppr {
  font-size: 9px;
  font-family: sans-serif;
  color: #6b21a8;
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px dashed #d0b0f0;
  line-height: 1.5;
}
.plnk {
  font-size: 9px;
  font-family: sans-serif;
  color: var(--gm);
  margin-top: 2px;
}
.pdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 3px;
  vertical-align: middle;
}
.dh {
  background: var(--hbd);
}
.dm2 {
  background: var(--mbd);
}
/* Production panel */
.ppanel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  overflow: hidden;
  margin-bottom: 10px;
}
.pc {
  padding: 10px 12px;
  border-right: 1px solid var(--bdr);
  background: #fff;
}
.pc:last-child {
  border-right: none;
}
.pc.comp {
  background: var(--gp);
}
.pcl {
  font-size: 9px;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tl);
  margin-bottom: 4px;
}
.pcv {
  font-size: 18px;
  font-weight: bold;
  color: var(--gd);
  line-height: 1;
}
.pcu {
  font-size: 9px;
  font-family: sans-serif;
  color: var(--tm);
  margin-top: 2px;
}
.pcdiv {
  background: var(--bdr);
  width: 2px;
}
.fn {
  font-size: 10px;
  font-family: sans-serif;
  color: var(--tl);
  background: #f9f9f9;
  border-radius: 5px;
  padding: 6px 10px;
  border-left: 3px solid var(--bdr);
  margin-top: 8px;
}
/* Dam prod mini */
.dpc {
  border: 1px solid var(--bdr);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.dpch {
  background: #ede9fe;
  padding: 5px 12px;
  font-size: 9px;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5b21b6;
  border-bottom: 1px solid #d8d0f0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dpch img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d8d0f0;
}
.dpcg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
}
.dpcc {
  padding: 7px 8px;
  border-right: 1px solid var(--bdr);
  text-align: center;
}
.dpcc:last-child {
  border-right: none;
}
.dpcl {
  font-size: 8px;
  font-family: sans-serif;
  color: var(--tl);
  margin-bottom: 2px;
}
.dpcv {
  font-size: 13px;
  font-weight: bold;
  color: var(--gd);
}
.dpcu {
  font-size: 8px;
  font-family: sans-serif;
  color: var(--tl);
}
/* Sire cards */
.scard {
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  padding: 13px 14px;
  background: #fff;
  margin-bottom: 10px;
}
.scard:hover {
  box-shadow: var(--sh);
}
.shd {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.sav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--bdr);
  flex-shrink: 0;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sinf {
  flex: 1;
  min-width: 0;
}
.snm {
  font-size: 14px;
  font-weight: bold;
  color: var(--td);
}
.smt {
  font-size: 11px;
  font-family: sans-serif;
  color: var(--tl);
  margin-top: 2px;
}
.sact {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
/* Offspring */
.ofi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  margin-bottom: 5px;
  cursor: pointer;
  transition: background 0.1s;
}
.ofi:hover {
  background: var(--gp);
}
/* Kinship */
.kchip {
  border: 1px solid var(--bdr);
  border-radius: 7px;
  padding: 5px 9px;
  background: #fff;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px;
  transition: all 0.15s;
}
.kchip:hover {
  background: var(--gp);
}
.kchip.on {
  background: var(--gp);
  border-color: var(--gm);
}
.kchip img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
.ktbl {
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 11px;
  width: 100%;
}
.ktbl th,
.ktbl td {
  border: 1px solid var(--bdr);
  padding: 5px 8px;
  text-align: center;
  white-space: nowrap;
}
.ktbl th {
  background: var(--gp);
  color: var(--gd);
  font-size: 10px;
}
.ktbl th.vt {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-width: 28px;
  padding: 6px 3px;
  font-size: 9px;
}
.khi {
  background: #fee2e2;
  color: #991b1b;
  font-weight: bold;
}
.kmd {
  background: #fef9c3;
  color: #854d0e;
  font-weight: 600;
}
.klo {
  background: #dcfce7;
  color: #166534;
}
.kzr {
  color: #ccc;
}
.ksf {
  background: #f0fdf4;
  color: #16a34a;
  font-style: italic;
  font-size: 10px;
}
.fclust {
  border: 1px solid var(--bdr);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 9px;
  background: #fff;
}
.fct {
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--gd);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fmb {
  border: 1px solid var(--bdr);
  border-radius: 6px;
  padding: 4px 8px;
  background: #fafafa;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 2px;
  transition: background 0.1s;
}
.fmb:hover {
  background: var(--gp);
}
.fmb img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}
/* Form */
.fg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.fg3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.fr {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fr.full {
  grid-column: 1/-1;
}
label {
  font-size: 10px;
  font-family: sans-serif;
  font-weight: 700;
  color: var(--tm);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
input,
select,
textarea {
  padding: 7px 9px;
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  font-family: "Georgia", serif;
  font-size: 13px;
  color: var(--td);
  background: #fff;
  transition: border-color 0.15s;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gm);
  box-shadow: 0 0 0 2px rgba(45, 122, 79, 0.1);
}
textarea {
  resize: vertical;
  min-height: 50px;
}
.phbox {
  border: 2px dashed var(--bdr);
  border-radius: var(--r);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  transition: all 0.15s;
}
.phbox:hover {
  border-color: var(--gm);
  background: var(--gp);
}
.phbox input {
  display: none;
}
.phtmb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--bdr);
  display: block;
  margin: 0 auto 5px;
}
.phht {
  font-family: sans-serif;
  font-size: 11px;
  color: var(--tl);
}
/* Parent picker */
.ppick {
  position: relative;
}
.ppwrap {
  display: flex;
  gap: 5px;
}
.ppwrap input {
  flex: 1;
}
.ppdd {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--gm);
  border-radius: var(--r);
  box-shadow: var(--shl);
  z-index: 400;
  max-height: 185px;
  overflow-y: auto;
  display: none;
}
.ppdd.on {
  display: block;
}
.ppopt {
  padding: 7px 10px;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 7px;
  align-items: center;
}
.ppopt:hover {
  background: var(--gp);
}
.ppav {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eee;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.ppav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ppsel {
  background: var(--gp);
  border: 1px solid var(--gm);
  border-radius: var(--r);
  padding: 4px 9px;
  font-family: sans-serif;
  font-size: 11px;
  display: none;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
}
.ppsel.on {
  display: flex;
}
.ppsel img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
/* Live calc */
.cprev {
  background: var(--gp);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}
.cpl {
  font-size: 9px;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--tm);
}
.cpv {
  font-size: 15px;
  font-weight: bold;
  font-family: sans-serif;
}
.fc {
  color: #c07a00;
}
.pc2 {
  color: #7a3aad;
}
/* Section title */
.st {
  font-family: sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: var(--gm);
  padding: 3px 9px;
  border-radius: 4px;
  margin: 12px 0 8px;
  display: inline-block;
}
.std {
  background: #8e44ad;
}
/* Modal */
.mov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mov.on {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: #fff;
  border-radius: var(--rl);
  padding: 18px;
  width: 620px;
  max-width: 97vw;
  max-height: 93vh;
  overflow-y: auto;
  box-shadow: var(--shl);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.mov.on .modal {
  transform: scale(1);
}
.mhd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mhd h3 {
  font-size: 15px;
  color: var(--gd);
}
.mft {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 14px;
}
.bttabs {
  display: flex;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--bdr);
  margin-bottom: 14px;
}
.bttab {
  flex: 1;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: #fff;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.bttab.ah {
  background: var(--hbg);
  color: var(--hbd);
  border-bottom: 2px solid var(--hbd);
}
.bttab.am {
  background: var(--mbg);
  color: var(--mbd);
  border-bottom: 2px solid var(--mbd);
}
.bttab.al {
  background: #dcfce7;
  color: #16a34a;
  border-bottom: 2px solid #16a34a;
}
.bttab.ax {
  background: #f3e8ff;
  color: #7c3aed;
  border-bottom: 2px solid #7c3aed;
}
.bttab.am {
  background: var(--mbg);
  color: var(--mbd);
  border-bottom: 2px solid var(--mbd);
}
/* Backup */
.bkgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bkcard {
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  padding: 14px;
  background: #fff;
}
.bkst {
  font-size: 10px;
  font-family: sans-serif;
  color: var(--tl);
  margin-top: 7px;
  min-height: 15px;
}
.bkst.ok {
  color: #16a34a;
}
.bkst.er {
  color: #c0392b;
}
/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 20px;
  font-size: 10px;
  font-family: sans-serif;
  font-weight: 600;
}
.tgh {
  background: var(--hbg);
  color: var(--hbd);
}
.tgm {
  background: var(--mbg);
  color: var(--mbd);
}
.tgl {
  background: #dcfce7;
  color: #16a34a;
}
.tgx {
  background: #f3e8ff;
  color: #7c3aed;
}
/* Empty */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--tl);
}
.empty .ei {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.28;
}
.empty h3 {
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--tm);
}
.empty p {
  font-size: 11px;
  font-family: sans-serif;
}
/* Toast */
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--gd);
  color: #fff;
  padding: 9px 15px;
  border-radius: var(--r);
  font-family: sans-serif;
  font-size: 12px;
  box-shadow: var(--shl);
  transform: translateY(55px);
  opacity: 0;
  transition: all 0.25s;
  z-index: 999;
}
.toast.on {
  transform: translateY(0);
  opacity: 1;
}

/* ══ PRINT ══ */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm 10mm 10mm;
  }
  body {
    background: #fff !important;
    font-size: 9pt;
  }
  header,
  aside,
  .mtabs,
  .srow,
  .no-print,
  #pg-sires,
  #pg-kin,
  #pg-backup,
  #pg-breed {
    display: none !important;
  }
  .shell {
    display: block !important;
  }
  #pg-herd {
    display: block !important;
    padding: 0;
    overflow: visible;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    break-inside: avoid;
    margin-bottom: 7px !important;
  }
  .ch {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: #e8f5ec !important;
  }
  #pLH,
  #pProdSubj,
  #pProdDams,
  #pSig,
  #pCompBar {
    display: block !important;
  }
  .lhbar {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .pb.g1 {
    background: #e8f5ec !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .pb.g2s,
  .pb.g3ss,
  .pb.g3ds {
    background: #eef3ff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .pb.g2d,
  .pb.g3sd,
  .pb.g3dd {
    background: #f5eeff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .pc.comp {
    background: #e8f5ec !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .dpch {
    background: #ede9fe !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
#pLH,
#pProdSubj,
#pProdDams,
#pSig,
#pCompBar {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE / ZOOM-SAFE STYLES
   Works at 50%–200% browser zoom and on any screen width
   ══════════════════════════════════════════════════════════════ */

/* All tables inside pages get horizontal scroll wrapper */
.page table {
  width: 100%;
  box-sizing: border-box;
}
.page .card {
  min-width: 0;
  overflow: visible;
}
.page .cb {
  overflow-x: auto;
}

/* Breeding page specific — all result/ranking tables scroll */
#pg-breed .cb {
  overflow-x: auto;
}
#pg-breed table {
  min-width: 500px;
}
#pg-breed .fg3 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* Header wraps gracefully */
header {
  flex-wrap: wrap;
  min-height: auto;
}
.hnav {
  flex-wrap: wrap;
}
.nb {
  min-height: 42px;
  padding: 0 10px;
  font-size: 11px;
}
.hacts {
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px;
}
.hbrand h1 {
  font-size: clamp(11px, 1.5vw, 15px);
}

/* Sidebar graceful shrink */
@media (max-width: 900px) {
  aside {
    width: 200px;
    min-width: 170px;
  }
  .anm {
    font-size: 11px;
  }
  .amt {
    font-size: 9px;
  }
}
@media (max-width: 700px) {
  .shell {
    flex-direction: column;
  }
  aside {
    width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--bdr);
    max-height: 200px;
  }
  .page {
    padding: 10px;
  }
}

/* Button and input min sizes for tap targets */
.btn {
  min-height: 30px;
}
input,
select,
textarea {
  min-height: 32px;
  font-size: clamp(12px, 1.2vw, 14px);
}

/* Card headers wrap on small space */
.ch {
  flex-wrap: wrap;
  gap: 6px;
}
.ch h2 {
  font-size: clamp(12px, 1.3vw, 14px);
  white-space: normal;
}

/* Stats row wraps and stays usable */
.srow {
  flex-wrap: wrap;
}
.sc {
  flex: 1 1 100px;
}
.sv {
  font-size: clamp(14px, 2vw, 20px);
}

/* Pedigree table scrolls on small viewport */
#pg-herd table {
  min-width: 480px;
}
#pg-herd .cb {
  overflow-x: auto;
}

/* Production panel wraps cleanly */
.ppanel .pcdiv {
  display: none;
} /* hide the visual divider when wrapped */
.pc {
  min-width: 90px;
}
.pcv {
  font-size: clamp(14px, 2vw, 18px);
}

/* Modal adapts to zoom */
.modal {
  width: min(620px, 96vw);
  padding: clamp(12px, 2vw, 20px);
}
.mhd h3 {
  font-size: clamp(13px, 1.5vw, 16px);
}

/* Tags and badges don't clip */
.tag {
  white-space: nowrap;
  font-size: clamp(9px, 1vw, 11px);
}
.bttab {
  font-size: clamp(11px, 1.2vw, 13px);
  padding: 7px;
}

/* Sire cards stack cleanly */
.shd {
  flex-wrap: wrap;
}
.sact {
  flex-wrap: wrap;
  gap: 4px;
}

/* Kinship chips wrap */
#kinChips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kchip {
  font-size: clamp(10px, 1vw, 12px);
}

/* Offspring items */
.ofi {
  flex-wrap: wrap;
}

/* Section title stays inline */
.st {
  white-space: nowrap;
}

/* Breeding page rank table scrolls */
#bp_ranking,
#bp_result {
  overflow-x: auto;
}
#bp_ranking table {
  min-width: 600px;
}

/* Breed avg table scrolls */
#bp_breedTable {
  overflow-x: auto;
}
#bp_breedTable table {
  min-width: 560px;
}

/* Herd inbreeding table scrolls */
#pg-breed table {
  border-collapse: collapse;
}

/* Methodology grid wraps */
#pg-breed .method-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Zoom safety: clamp all small font sizes so they don't vanish */
.plbl,
.pcl,
.pcu,
.dpcl,
.dpcu,
.amt,
.sl,
.phht,
.smt,
.sbh h3,
.fn {
  font-size: clamp(9px, 0.9vw, 11px);
}
.pid2,
.pdb,
.ppr,
.plnk {
  font-size: clamp(8px, 0.85vw, 10px);
}
.pnm {
  font-size: clamp(11px, 1.1vw, 13px);
}
.dpcv {
  font-size: clamp(11px, 1.2vw, 14px);
}

/* Ensure nothing clips the main layout */
html,
body {
  overflow-x: hidden;
}

/* ── Breeding page: each section fully visible at any zoom ── */
#pg-breed {
  overflow-y: auto;
  overflow-x: hidden;
}
#pg-breed .card {
  overflow: visible;
}
#pg-breed .cb,
#pg-breed [id^="bp_sec"] {
  overflow: visible;
}
#bp_result,
#bp_ranking,
#bp_breedTable {
  overflow-x: auto;
  max-width: 100%;
}
#bp_result table,
#bp_ranking table,
#bp_breedTable table {
  min-width: 420px;
  font-size: clamp(10px, 1vw, 12px);
}
/* Rank table — scroll container */
#bp_ranking {
  overflow-x: auto;
}
/* Predictor inputs — full width always */
#bp_cowQ,
#bp_sireQ,
#bp_extSire {
  width: 100%;
}
/* Dropdown panels — must not overflow card */
#bp_cowDD,
#bp_sireDD {
  max-width: calc(100vw - 60px);
}
/* Section headers clickable */
#pg-breed .ch {
  user-select: none;
}
/* Risk level boxes wrap */
#pg-breed .risk-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Report status bar ── */
.bkst {
  font-family: sans-serif;
  font-size: 11px;
  padding: 7px 14px;
  border-radius: var(--r);
  margin-top: 6px;
  transition: all 0.3s;
  display: block;
}
.bkst.ok {
  background: #d1fae5;
  color: #065f46;
  font-weight: 600;
}
.bkst.er {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}

/* ── Auth / Login / User Portal ── */
#loginGate input:focus {
  box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.2);
}
.up-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 14px;
}
.up-card-hdr {
  background: linear-gradient(135deg, #1a4a2e, #2d7a4f);
  color: #fff;
  padding: 12px 16px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.up-card-hdr h2 {
  font-size: 14px;
  margin: 0;
}
.up-card-body {
  padding: 14px 16px;
}
.up-stat {
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.up-stat .sv {
  font-size: 22px;
  font-weight: bold;
  color: #1a4a2e;
}
.up-stat .sl {
  font-size: 10px;
  color: #6b7280;
}
@media print {
  #userPortal .no-print {
    display: none !important;
  }
}

/* ════════════════════════════════════════════
   USER PORTAL STYLES
═══════════════════════════════════════════ */
.up-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 12px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #374151;
  cursor: pointer;
  border-radius: 6px;
  margin: 0 8px;
  width: calc(100% - 16px);
  transition:
    background 0.15s,
    color 0.15s;
}
.up-nav-btn:hover {
  background: #f0fdf4;
  color: #1a4a2e;
}
.up-nav-btn.active {
  background: #1a4a2e;
  color: #fff;
  font-weight: 600;
}
.up-nav-btn.active:hover {
  background: #2d7a4f;
}
.up-card2 {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 14px;
}
.up-card2-hdr {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.up-card2-hdr h3 {
  font-size: 14px;
  color: #1a2e1a;
  margin: 0;
}
.up-card2-body {
  padding: 16px 18px;
}
.up-field {
  margin-bottom: 13px;
}
.up-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.up-field input,
.up-field select,
.up-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  font-size: 13px;
  font-family: "Segoe UI", Arial, sans-serif;
  outline: none;
  transition: border 0.2s;
  background: #fff;
}
.up-field input:focus,
.up-field select:focus,
.up-field textarea:focus {
  border-color: #2d7a4f;
  box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.12);
}
.up-field textarea {
  resize: vertical;
  min-height: 70px;
}
.up-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: "Segoe UI", Arial, sans-serif;
}
.up-btn:hover {
  opacity: 0.88;
}
.up-btn-green {
  background: linear-gradient(135deg, #1a4a2e, #2d7a4f);
  color: #fff;
}
.up-btn-gray {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.up-btn-blue {
  background: #1e40af;
  color: #fff;
}
.up-msg-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 13px 15px;
  margin-bottom: 9px;
  cursor: pointer;
  transition:
    background 0.15s,
    border 0.15s;
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
}
.up-msg-card:hover {
  background: #f8fafc;
  border-color: #a7f3d0;
}
.up-msg-card.unread {
  border-left: 3px solid #2d7a4f;
  background: #f0fdf4;
}
.up-msg-card.admin-reply {
  border-left: 3px solid #1e40af;
  background: #eff6ff;
}
.up-stat2 {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 13px 15px;
  text-align: center;
}
.up-stat2 .n {
  font-size: 28px;
  font-weight: bold;
  color: #1a4a2e;
}
.up-stat2 .l {
  font-size: 10px;
  color: #6b7280;
  margin-top: 2px;
}
.up-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.up-badge-pending {
  background: #fef9c3;
  color: #854d0e;
}
.up-badge-replied {
  background: #dbeafe;
  color: #1e40af;
}
.up-badge-done {
  background: #d1fae5;
  color: #065f46;
}
.up-badge-new {
  background: #fee2e2;
  color: #991b1b;
}
@media (max-width: 700px) {
  #up_sidenav {
    display: none;
  }
  #up_main {
    padding: 12px;
  }
}

/* ════════════════════════════════════════════════════════════════
   UI/UX POLISH LAYER — appended 2026-05-28
   Non-breaking enhancements. Delete this whole block to revert.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Accessible focus rings (replaces invisible outline:none) ── */
:root { --focus-ring: 0 0 0 3px rgba(45, 122, 79, 0.35); }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--gm);
}

/* ── 2. Button press feedback ── */
.btn:active,
.nb:active,
.sf:active,
.ib:active { transform: translateY(1px); }

.btn { transition: background 0.15s, box-shadow 0.15s, transform 0.08s; }
.bg:hover, .bb:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.bw:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45); }

/* ── 3. Card hover lift (subtle) ── */
.card,
.scard,
.fclust,
.dpc { transition: box-shadow 0.18s, transform 0.18s; }
.card:hover { box-shadow: var(--shl); }

/* ── 4. Form inputs — consistent focus, larger tap target ── */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="search"],
select,
textarea {
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 32px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gm);
}

/* ── 5. Custom scrollbar (Chromium / Edge / Safari) ── */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(45, 122, 79, 0.28);
  border-radius: 6px;
  border: 2px solid #faf8f2;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(45, 122, 79, 0.5); }
* { scrollbar-width: thin; scrollbar-color: rgba(45, 122, 79, 0.4) transparent; }

/* ── 6. Toast: better visibility + multiline + max width ── */
.toast {
  max-width: min(420px, calc(100vw - 36px));
  line-height: 1.4;
  padding: 11px 18px;
  border-left: 4px solid var(--gl);
  font-size: 13px;
  white-space: pre-wrap;
}

/* ── 7. Modal: backdrop blur + smooth fade ── */
.mov {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background: rgba(15, 30, 20, 0.45) !important;
  transition: opacity 0.18s;
}
.mov .modal {
  animation: modalIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 8. Page transition ── */
.page.on { animation: pageIn 0.18s ease-out; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 9. Sidebar animal items: smoother hover, active highlight ── */
.ai { transition: background 0.12s, padding-left 0.12s; }
.ai:hover { padding-left: 14px; }
.ai.on { border-left-width: 4px; }

/* ── 10. Empty state styling (apply class="empty" anywhere) ── */
.empty {
  text-align: center;
  padding: 32px 18px;
  color: var(--tl);
  font-family: sans-serif;
  font-size: 13px;
}
.empty::before {
  content: "📭";
  display: block;
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.55;
}

/* ── 11. Loading shimmer (apply class="skel" for placeholder bars) ── */
.skel {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.2s infinite;
  color: transparent !important;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── 12. Pedigree boxes: clearer hover affordance for linked ── */
.pb.lk { transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.pb.lk:hover { border-color: var(--gd); }

/* ── 13. Kinship chips: smoother selection ── */
.kchip { transition: background 0.12s, border-color 0.12s, transform 0.08s; }
.kchip:active { transform: scale(0.97); }

/* ── 14. Tabs: animated underline ── */
.mt { position: relative; transition: color 0.15s; }
.mt::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -2px;
  height: 2px;
  background: var(--gm);
  transition: left 0.18s, right 0.18s;
}
.mt.on::after { left: 0; right: 0; }

/* ── 15. Better disabled state ── */
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 16. Mobile: tighter sidebar, larger tap targets ── */
@media (max-width: 768px) {
  aside { width: 220px; min-width: 200px; }
  .nb { padding: 0 10px; font-size: 11px; }
  .btn { padding: 8px 12px; min-height: 36px; }
  .ai { padding: 11px 12px; }
  .hbrand h1 { font-size: 12px; }
  .page { padding: 12px; gap: 10px; }
}
@media (max-width: 520px) {
  /* Stack header brand + actions vertically */
  header { flex-direction: column; }
  .hacts { width: 100%; justify-content: flex-end; padding: 6px 12px; }
  /* Sidebar becomes top strip on very small screens */
  .shell { flex-direction: column; }
  aside {
    width: 100%; max-width: 100%; min-width: 0;
    max-height: 38vh; border-right: none;
    border-bottom: 1px solid var(--bdr);
  }
}

/* ── 17. Respect users who prefer reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

/* ── 18. Print: cleaner pedigree certificate output ── */
@media print {
  .toast, .mov, header, aside { display: none !important; }
  body { background: #fff !important; }
  .page { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #999 !important; break-inside: avoid; }
  a { color: #000 !important; text-decoration: none !important; }
}

/* ── 19. Selection colour matches brand ── */
::selection { background: rgba(76, 175, 111, 0.28); color: var(--td); }

/* ── 20. Smooth scroll within pages ── */
html { scroll-behavior: smooth; }

/* ════════════════════════════════════════════════════════════════
   DEEP PEDIGREE — horizontal tree view (up to 11 gens)
   Added 2026-05-28
   ════════════════════════════════════════════════════════════════ */
.dp-controls {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bdr);
}
.dp-ctrl {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tm);
}
.dp-ctrl select {
  padding: 5px 8px;
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  background: #fff;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--td);
  min-width: 180px;
}
.dp-subject {
  flex: 1;
  background: var(--gp);
  padding: 7px 12px;
  border-radius: var(--r);
  font-size: 13px;
  min-width: 200px;
}

.dp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.dp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: var(--r);
  font-family: sans-serif;
  font-size: 11px;
  color: var(--tm);
  margin-bottom: 10px;
  align-items: center;
}
.dp-sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid;
}
.dp-sw-self    { background: var(--gp);   border-color: var(--gm); }
.dp-sw-sire    { background: #eef3ff;     border-color: #3a6bc4; }
.dp-sw-dam     { background: #f5eeff;     border-color: #8e44ad; }
.dp-sw-unknown { background: #fafafa;     border-color: #d1d5db; border-style: dashed; }

/* ── Inbreeding analysis panel (on-screen) ── */
.dp-inbreed {
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--sh);
}
.dp-inbreed-none {
  padding: 11px 14px;
  font-family: sans-serif;
  font-size: 12px;
  color: var(--tm);
  background: #fffbeb;
  border-color: #fde68a;
}
.dp-inbreed-head {
  background: var(--gp);
  color: var(--gd);
  padding: 7px 14px;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--bdr);
}
.dp-inbreed-body {
  display: flex;
  gap: 16px;
  padding: 12px 14px;
  flex-wrap: wrap;
  font-family: sans-serif;
}
.dp-inbreed-f { min-width: 200px; flex: 0 0 auto; }
.dp-inbreed-dep { flex: 1; min-width: 240px; }
.dp-itbl td { padding: 3px 0; border-bottom: 1px solid #f0f0f0; }
.dp-itbl th { color: var(--tl); font-weight: 600; }

/* Horizontally scrollable canvas — needed at depth 8-11 */
.dp-scroll {
  overflow: auto;
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  background:
    linear-gradient(#fff, #fff),
    repeating-linear-gradient(90deg, transparent, transparent 159px, #f0f0f0 159px, #f0f0f0 160px);
  background-clip: padding-box;
  background-attachment: local;
  padding: 16px;
  max-height: 78vh;
}

/* Recursive tree: each branch lays out child→[sire,dam] horizontally with connector lines */
.dp-tree {
  display: inline-block;
  font-family: sans-serif;
  min-width: 100%;
}
.dp-branch {
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
}
.dp-card-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
}
.dp-children {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
/* Vertical connector line spanning sire→dam pair */
.dp-children::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: #b8c5b8;
}
/* Horizontal connector from child card to vertical spine */
.dp-child {
  position: relative;
  padding-left: 0;
}
.dp-child::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 11px;
  height: 2px;
  background: #b8c5b8;
}
.dp-child-sire > .dp-branch > .dp-card-wrap .dpn { /* nothing extra, color carries meaning */ }

/* Ancestor card */
.dpn {
  min-width: 140px;
  max-width: 180px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1.5px solid;
  background: #fff;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.dpn-self    { border-color: var(--gm); background: var(--gp); }
.dpn-sire    { border-color: #3a6bc4; background: #eef3ff; }
.dpn-dam     { border-color: #8e44ad; background: #f5eeff; }
.dpn-unknown {
  border-color: #d1d5db;
  border-style: dashed;
  background: #fafafa;
  color: #9ca3af;
  text-align: center;
  font-weight: bold;
  min-width: 32px;
  padding: 6px 8px;
}
.dpn-lk { cursor: pointer; }
.dpn-lk:hover {
  transform: translateX(2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  border-color: var(--gd);
}
.dpn-name {
  font-weight: 700;
  color: var(--td);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dpn-reg {
  font-size: 9px;
  color: var(--tm);
  margin-top: 1px;
  font-family: monospace;
}
.dpn-link { font-size: 10px; opacity: 0.7; }

/* Collapse / expand toggle button on each card */
.dp-toggle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--gm);
  background: #fff;
  color: var(--gm);
  font-weight: bold;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.12s;
}
.dp-toggle:hover { background: var(--gp); }

/* Compact mode at depths > 6 (auto-shrinks via container query fallback) */
.dp-tree:has(.dp-branch .dp-children .dp-children .dp-children .dp-children .dp-children) .dpn {
  min-width: 110px;
  max-width: 150px;
  font-size: 11px;
  padding: 4px 8px;
}

/* Deep Pedigree prints via popup window (openDeepPedigreeCertificate) — uses
   the same Pedigree Certificate Settings as the standard 2/3-gen certificate. */

/* ════════════════════════════════════════════════════════════════
   MODERN VISUAL REFRESH — appended 2026-06-11
   Reversible: delete this whole block to return to the classic look.
   Keeps the green brand identity but updates typography, color depth,
   cards, buttons, inputs and the header to a contemporary style.
   (Pedigree certificates open in their own windows with inline styles,
   so they are unaffected by this layer.)
   ════════════════════════════════════════════════════════════════ */

:root {
  /* Refined palette — richer, slightly desaturated greens + modern neutrals */
  --gd: #14432a;
  --gm: #2f7d52;
  --gl: #46b478;
  --gp: #eef6f0;
  --td: #16241c;
  --tm: #4a5a50;
  --tl: #8a978f;
  --bdr: #dde7e0;
  --r: 10px;
  --rl: 14px;
  --sh: 0 1px 2px rgba(16, 40, 28, 0.06), 0 4px 12px rgba(16, 40, 28, 0.05);
  --shl: 0 8px 30px rgba(16, 40, 28, 0.14);
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Modern type — switch the serif body to a clean UI sans */
body {
  font-family: var(--font-ui);
  background: #f5f8f6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hbrand h1,
.ch h2,
.snm,
.anm,
.pnm { font-family: var(--font-ui); letter-spacing: -0.01em; }

/* Header — deeper gradient, crisper */
header {
  background: linear-gradient(135deg, #14432a 0%, #226c44 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.nb { font-weight: 600; letter-spacing: 0.01em; border-radius: 8px 8px 0 0; }
.nb.act { background: rgba(255, 255, 255, 0.1); }

/* Cards — softer, deeper, more breathing room */
.card {
  border-radius: var(--rl);
  border: 1px solid var(--bdr);
  box-shadow: var(--sh);
}
.ch {
  background: linear-gradient(180deg, #f3f9f5, #eef6f0);
  border-bottom: 1px solid var(--bdr);
}
.ch h2 { font-weight: 700; }

/* Buttons — modern, tactile */
.btn {
  border-radius: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(16, 40, 28, 0.08);
}
.bg { background: linear-gradient(135deg, #2f7d52, #46b478); }
.bg:hover { background: linear-gradient(135deg, #2a7049, #3da66f); filter: brightness(1.03); }
.bw { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

/* Stat cards — modern numeric emphasis */
.sc { border-radius: var(--rl); box-shadow: var(--sh); }
.sv { letter-spacing: -0.02em; }

/* Inputs — larger, rounded, modern focus */
input, select, textarea {
  border-radius: 9px !important;
}

/* Sidebar — cleaner separation */
aside { background: #fbfdfc; }
.ai.on { background: var(--gp); }

/* Pills / tags rounding */
.tag, .badge { border-radius: 999px; }

/* Subtle entrance for cards on the active page */
.page.on > .card { animation: cardRise 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes cardRise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Collapsible form sections (ease-of-use: tame the long add-animal form) ── */
.fsec-hd {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s;
}
.fsec-hd:hover { filter: brightness(0.97); }
.fsec-ico {
  font-size: 12px;
  color: var(--gm);
  transition: transform 0.15s;
  margin-left: 8px;
}
.fsec-body { overflow: hidden; }
.fsec-body.collapsed { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   COMBINED LANDING VIEW (#landingView) — was landing.html, now an
   in-app overlay. All selectors scoped under #landingView so they
   never collide with the app's own styles.
   ════════════════════════════════════════════════════════════════ */
#landingView {
  --gd:#0f3a23; --gm:#2f7d52; --gl:#46b478; --glow:rgba(70,180,120,.45);
  --ink:#0e1a13; --ink2:#41504a; --lvbg:#f6faf7; --lvcard:#fff;
  --lvr:16px; --lvrl:24px;
  --lvfont:"Inter","Segoe UI",system-ui,-apple-system,sans-serif;
  --lvfont-rtl:"Noto Naskh Arabic","Tahoma","Segoe UI",sans-serif;
  position:fixed; inset:0; z-index:10000; overflow-y:auto; overflow-x:hidden;
  background:var(--lvbg); color:var(--ink); font-family:var(--lvfont); line-height:1.6;
}
#landingView[dir="rtl"] { font-family:var(--lvfont-rtl); }
#landingView a { text-decoration:none; color:inherit; }
#landingView h1,#landingView h2,#landingView h3,#landingView p { margin:0; }

#landingView .lv-header {
  position:sticky; top:0; z-index:100; display:flex; align-items:center; justify-content:space-between;
  padding:14px clamp(16px,4vw,48px); backdrop-filter:blur(12px); background:rgba(246,250,247,.82);
  border-bottom:1px solid transparent; transition:border-color .3s,box-shadow .3s;
}
#landingView .lv-header.scrolled { border-bottom-color:rgba(0,0,0,.06); box-shadow:0 4px 24px rgba(15,58,35,.06); }
#landingView .lv-brand { display:flex; align-items:center; gap:11px; }
#landingView .lv-logo { width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,var(--gd),var(--gl));
  display:flex; align-items:center; justify-content:center; font-size:22px; box-shadow:0 6px 18px var(--glow); flex-shrink:0; }
#landingView .lv-brandtxt b { font-size:17px; font-weight:800; letter-spacing:-.02em; display:block; line-height:1.1; }
#landingView .lv-brandtxt span { font-size:10.5px; color:var(--ink2); font-weight:500; }
#landingView .lv-nav { display:flex; align-items:center; gap:clamp(6px,2vw,26px); }
#landingView .lv-navlink { font-size:14px; font-weight:600; color:var(--ink2); transition:color .2s; white-space:nowrap; cursor:pointer; }
#landingView .lv-navlink:hover { color:var(--gm); }
@media(max-width:720px){ #landingView .lv-navlink { display:none; } }

#landingView .lv-langs { display:flex; gap:3px; background:rgba(47,125,82,.1); border-radius:999px; padding:3px; }
#landingView .lv-langbtn { border:none; background:transparent; cursor:pointer; font:inherit; font-size:12.5px; font-weight:700;
  color:var(--ink2); padding:5px 12px; border-radius:999px; transition:all .2s; white-space:nowrap; }
#landingView .lv-langbtn.on { background:#fff; color:var(--gd); box-shadow:0 2px 8px rgba(0,0,0,.1); }

#landingView .lv-btn { display:inline-flex; align-items:center; gap:8px; border:none; cursor:pointer; font:inherit; font-weight:700;
  border-radius:999px; transition:transform .15s,box-shadow .25s,background .25s; white-space:nowrap; }
#landingView .lv-primary { background:linear-gradient(135deg,var(--gm),var(--gl)); color:#fff; padding:11px 22px; font-size:14px; box-shadow:0 8px 22px var(--glow); }
#landingView .lv-primary:hover { transform:translateY(-2px); box-shadow:0 12px 30px var(--glow); }
#landingView .lv-ghost { background:rgba(47,125,82,.08); color:var(--gd); padding:11px 22px; font-size:14px; }
#landingView .lv-ghost:hover { background:rgba(47,125,82,.16); }
#landingView .lv-lg { padding:15px 32px; font-size:16px; }

#landingView .lv-hero { position:relative; padding:clamp(56px,9vh,90px) clamp(16px,5vw,48px) clamp(60px,10vh,110px); text-align:center; overflow:hidden; }
#landingView .lv-herobg { position:absolute; inset:0; z-index:0; background:
  radial-gradient(1100px 600px at 50% -10%,rgba(70,180,120,.22),transparent 60%),
  radial-gradient(800px 500px at 12% 20%,rgba(47,125,82,.14),transparent 55%),
  radial-gradient(800px 500px at 88% 15%,rgba(15,58,35,.12),transparent 55%); }
#landingView .lv-hero > *:not(.lv-herobg):not(.lv-blob):not(.lv-herovid):not(.lv-herovid-veil) { position:relative; z-index:2; }
/* Wide, fitted DNA video filling the hero */
#landingView .lv-herovid { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; pointer-events:none; }
/* Light veil so the gradient headline stays readable over the video */
#landingView .lv-herovid-veil { position:absolute; inset:0; z-index:1; background:
  linear-gradient(180deg, rgba(246,250,247,.62) 0%, rgba(246,250,247,.78) 55%, rgba(246,250,247,.92) 100%); }
#landingView .lv-blob { position:absolute; border-radius:50%; filter:blur(60px); opacity:.5; z-index:1; animation:lvFloat 14s ease-in-out infinite; }
#landingView .lv-blob.b1 { width:340px; height:340px; background:#7be3ad; top:-60px; left:-40px; }
#landingView .lv-blob.b2 { width:280px; height:280px; background:#bfe7d2; top:40px; right:-30px; animation-delay:-5s; }
#landingView .lv-blob.b3 { width:240px; height:240px; background:#9adcb9; bottom:-80px; left:40%; animation-delay:-9s; }
@keyframes lvFloat { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(30px,-30px) scale(1.08)} 66%{transform:translate(-20px,20px) scale(.96)} }

#landingView .lv-badge { display:inline-flex; align-items:center; gap:8px; background:#fff; border:1px solid rgba(47,125,82,.2);
  color:var(--gd); font-size:13px; font-weight:700; padding:7px 16px; border-radius:999px; margin-bottom:24px; box-shadow:0 4px 16px rgba(15,58,35,.06); }
#landingView .lv-dot { width:8px; height:8px; border-radius:50%; background:var(--gl); animation:lvPulse 2s infinite; }
@keyframes lvPulse { 0%{box-shadow:0 0 0 0 var(--glow)} 70%{box-shadow:0 0 0 9px rgba(70,180,120,0)} 100%{box-shadow:0 0 0 0 rgba(70,180,120,0)} }
#landingView .lv-hero h1 { font-size:clamp(34px,6vw,64px); font-weight:900; line-height:1.06; letter-spacing:-.03em; max-width:14ch; margin:0 auto 22px;
  background:linear-gradient(135deg,#0f3a23 30%,#2f7d52 70%,#46b478); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
#landingView[dir="rtl"] .lv-hero h1 { max-width:20ch; line-height:1.25; }
#landingView .lv-sub { font-size:clamp(16px,2.2vw,21px); color:var(--ink2); max-width:62ch; margin:0 auto 36px; font-weight:500; }
#landingView .lv-herocta { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

#landingView .lv-reveal { opacity:0; transform:translateY(28px); transition:opacity .7s cubic-bezier(.2,.8,.2,1),transform .7s cubic-bezier(.2,.8,.2,1); }
#landingView .lv-reveal.in { opacity:1; transform:none; }

#landingView .lv-block { padding:clamp(56px,9vh,96px) clamp(16px,5vw,48px); max-width:1180px; margin:0 auto; }
#landingView .lv-sechead { text-align:center; max-width:64ch; margin:0 auto clamp(36px,6vh,56px); }
#landingView .lv-sechead h2 { font-size:clamp(26px,4vw,42px); font-weight:850; letter-spacing:-.02em; line-height:1.15; margin-bottom:14px; color:var(--gd); }
#landingView .lv-sechead p { font-size:clamp(15px,1.8vw,18px); color:var(--ink2); font-weight:500; }

#landingView .lv-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:clamp(16px,2.5vw,26px); }
#landingView .lv-fcard { background:var(--lvcard); border:1px solid rgba(15,58,35,.07); border-radius:var(--lvrl); padding:28px 24px;
  box-shadow:0 4px 20px rgba(15,58,35,.05); transition:transform .25s,box-shadow .25s,border-color .25s; position:relative; overflow:hidden; }
#landingView .lv-fcard:hover { transform:translateY(-6px); box-shadow:0 18px 44px rgba(15,58,35,.12); border-color:rgba(70,180,120,.35); }
#landingView .lv-ficon { width:54px; height:54px; border-radius:15px; display:flex; align-items:center; justify-content:center; font-size:27px;
  background:linear-gradient(135deg,rgba(47,125,82,.14),rgba(70,180,120,.2)); margin-bottom:18px; }
#landingView .lv-fcard h3 { font-size:18px; font-weight:800; margin-bottom:9px; letter-spacing:-.01em; }
#landingView .lv-fcard p { font-size:14.5px; color:var(--ink2); font-weight:500; }

#landingView .lv-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:clamp(18px,3vw,34px); }
#landingView .lv-step .lv-num { width:48px; height:48px; border-radius:50%; background:linear-gradient(135deg,var(--gd),var(--gm)); color:#fff;
  font-weight:900; font-size:20px; display:flex; align-items:center; justify-content:center; margin-bottom:18px; box-shadow:0 8px 20px var(--glow); }
#landingView .lv-step h3 { font-size:19px; font-weight:800; margin-bottom:8px; }
#landingView .lv-step p { font-size:14.5px; color:var(--ink2); font-weight:500; }

#landingView .lv-stats { background:linear-gradient(135deg,var(--gd),#1c5436); color:#fff; border-radius:var(--lvrl);
  padding:clamp(30px,5vw,52px) clamp(20px,4vw,40px); display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:24px; text-align:center; box-shadow:0 20px 50px rgba(15,58,35,.25); position:relative; overflow:hidden; }
#landingView .lv-stats .lv-sv { font-size:clamp(32px,5vw,50px); font-weight:900; line-height:1; letter-spacing:-.02em;
  background:linear-gradient(135deg,#fff,#a6f0c8); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
#landingView .lv-stats .lv-sl { font-size:13px; opacity:.85; font-weight:600; margin-top:8px; }

#landingView .lv-ctawrap { text-align:center; background:var(--lvcard); border:1px solid rgba(15,58,35,.08); border-radius:var(--lvrl);
  padding:clamp(40px,7vw,72px) clamp(20px,5vw,48px); box-shadow:0 10px 40px rgba(15,58,35,.07); }
#landingView .lv-ctawrap h2 { font-size:clamp(24px,4vw,38px); font-weight:850; color:var(--gd); margin-bottom:14px; letter-spacing:-.02em; }
#landingView .lv-ctawrap p { font-size:clamp(15px,1.8vw,18px); color:var(--ink2); margin-bottom:30px; font-weight:500; }

#landingView .lv-footer { border-top:1px solid rgba(15,58,35,.08); padding:36px clamp(16px,5vw,48px); text-align:center; color:var(--ink2); }
#landingView .lv-ftag { font-size:14.5px; font-weight:600; color:var(--gd); margin-bottom:8px; }
#landingView .lv-fcopy { font-size:12.5px; }

#landingView[dir="rtl"] .lv-btn,#landingView[dir="rtl"] .lv-badge { flex-direction:row-reverse; }

/* ── Header brand block fix (logo + app name alignment) ── */
.hbrand { gap: 11px; align-items: center; max-width: 46%; }
.hbrand > div:last-child { min-width: 0; }
.hbrand h1 {
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.hsub {
  font-family: var(--font-ui, sans-serif);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .hbrand { max-width: 100%; }
  .hsub { display: none; }
}

/* ── Sub-tab bar for grouped sections (Breeding/Kinship, Settings) ── */
.subtab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bdr);
}

/* ── Landing auto-rotating photo showcase ── */
#landingView .lv-gallery {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;            /* fallback until JS measures the photo */
  border-radius: var(--lvrl, 24px);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 58, 35, 0.18);
  background: #dfeee5;
}
#landingView .lv-slide {
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;        /* fill the whole frame, no empty sides */
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s ease, transform 6s ease;
}
#landingView .lv-slide.on { opacity: 1; transform: scale(1); }
#landingView .lv-dots {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  display: flex; justify-content: center; gap: 8px; z-index: 2;
}
#landingView .lv-dot-i {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55); cursor: pointer;
  transition: background 0.2s, transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
#landingView .lv-dot-i.on { background: #fff; transform: scale(1.3); }

/* ── Inbreeding worked-example explainer ── */
.ibx-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(15, 30, 20, 0.55);
  backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
  padding: 16px; font-family: var(--font-ui, sans-serif);
}
.ibx-modal {
  background: #fff; border-radius: 16px; width: min(720px, 100%);
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35); overflow: hidden;
  animation: ibxIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes ibxIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.ibx-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: linear-gradient(135deg, #0f3a23, #2f7d52); color: #fff;
}
.ibx-head b { font-size: 16px; }
.ibx-x { background: rgba(255,255,255,.18); border: none; color: #fff; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ibx-x:hover { background: rgba(255,255,255,.3); }
.ibx-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px; overflow-y: auto; }
@media (max-width: 620px) { .ibx-body { grid-template-columns: 1fr; } }
.ibx-diag { display: flex; align-items: flex-start; justify-content: center; }
.ibx-text { font-size: 14px; color: var(--td, #1a2e1a); line-height: 1.6; }
.ibx-text p { margin-bottom: 10px; }
.ibx-formula {
  background: #f0fdf4; border: 1px solid #a7f3d0; border-radius: 10px;
  padding: 10px 14px; margin: 8px 0; text-align: center;
  font-size: 18px; font-weight: 700; color: #14532d; letter-spacing: 0.5px;
}
.ibx-formula sup { font-size: 12px; }
.ibx-ref { border: 1px solid var(--bdr, #ddd); border-radius: 10px; overflow: hidden; margin-top: 10px; }
.ibx-ref-h { background: var(--gp, #eef6f0); padding: 7px 12px; font-size: 12px; font-weight: 700; color: var(--gd, #14432a); }
.ibx-ref-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 12px; font-size: 12px; border-top: 1px solid #f0f0f0; }
.ibx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--bdr, #eee); background: #fafafa; }
.ibx-dots { display: flex; gap: 7px; }
.ibx-dot { width: 9px; height: 9px; border-radius: 50%; background: #cfd8d2; cursor: pointer; transition: background .2s, transform .2s; }
.ibx-dot.on { background: var(--gm, #2f7d52); transform: scale(1.3); }

/* ── Landing inbreeding-example teaser ── */
#landingView .lv-learn {
  text-align: center;
  background: linear-gradient(135deg, #0f3a23, #1c5436);
  color: #fff;
  border-radius: var(--lvrl, 24px);
  padding: clamp(34px, 6vw, 60px) clamp(20px, 5vw, 48px);
  box-shadow: 0 20px 50px rgba(15, 58, 35, 0.25);
  position: relative;
  overflow: hidden;
}
#landingView .lv-learn::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(70, 180, 120, 0.28);
  filter: blur(70px); top: -120px; left: -60px;
}
#landingView .lv-learn > * { position: relative; z-index: 1; }
#landingView .lv-learn-ico {
  font-size: 40px;
  margin-bottom: 10px;
}
#landingView .lv-learn h2 {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 850;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
#landingView .lv-learn p {
  font-size: clamp(14px, 1.8vw, 18px);
  opacity: 0.9;
  max-width: 56ch;
  margin: 0 auto 26px;
  font-weight: 500;
}

