/* ============================================================
   Fleece Scouring Yield Calculator — sakura flavor
   ============================================================ */

:root {
  --fl-bg:      var(--c-sakura-bg);
  --fl-border:  var(--c-sakura-border);
  --fl-text:    var(--c-sakura-text);
  --fl-icon-bg: var(--c-sakura-icon-bg);
}

/* ---- Hero ---- */
.app-hero {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem 1.1rem;
}
.app-hero--sakura {
  background: var(--fl-bg);
  border-bottom-color: var(--fl-border);
}
.app-hero__inner { margin: 0 auto; }
.app-hero__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--fl-text);
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
  line-height: 1.2;
}
.app-hero__desc {
  font-size: .9rem;
  color: var(--color-text-secondary);
  max-width: 660px;
  line-height: 1.6;
  margin: 0 0 .85rem;
}
.app-hero__chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: .22rem .65rem;
  font-size: .72rem;
  font-weight: 700;
  background: var(--color-surface);
  border: 1.5px solid var(--fl-border);
  border-radius: var(--radius-full);
  color: var(--fl-text);
  white-space: nowrap;
}

/* ---- Layout ---- */
.app-wrap {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 1rem 3rem;
}

/* ---- Left pane ---- */
.pane-in {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.125rem;
}

.card-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fl-text);
  margin: 0 0 .75rem;
}

/* ---- Fields ---- */
.field { margin-bottom: .75rem; }
.field:last-child { margin-bottom: 0; }

label.lbl {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: .28rem;
}

select.sel,
input.num-in {
  width: 100%;
  box-sizing: border-box;
  padding: .4rem .6rem;
  font-size: .85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  transition: border-color .15s;
}
select.sel:focus,
input.num-in:focus { outline: none; border-color: var(--fl-text); }

/* ---- Weight row: input + unit toggle inline ---- */
.weight-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.weight-row input { flex: 1; }

/* ---- Unit toggle ---- */
.unit-toggle {
  display: flex;
  border: 1.5px solid var(--fl-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}
.unit-toggle button {
  padding: .32rem .55rem;
  font-size: .74rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background .15s, color .15s;
}
.unit-toggle button.active {
  background: var(--fl-bg);
  color: var(--fl-text);
}

/* ---- WPI slider ---- */
.slider-row { display: flex; align-items: center; gap: .5rem; }
.slider-row input[type=range] {
  flex: 1;
  accent-color: var(--fl-text);
  height: 4px;
}
.slider-val {
  font-size: .75rem;
  font-weight: 700;
  color: var(--fl-text);
  min-width: 120px;
  text-align: right;
}

/* ---- Breed info card ---- */
.breed-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem .6rem;
  margin-top: .1rem;
}
.bi-cell { }
.bi-lbl {
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  margin-bottom: .1rem;
}
.bi-val {
  font-size: .88rem;
  font-weight: 700;
  color: var(--fl-text);
}

/* ---- Right pane ---- */
.pane-out {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- Stats grid ---- */
.results-card {
  background: var(--color-surface);
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

.results-card .card-title { margin-bottom: 1rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
}

.stat-cell {
  background: var(--fl-bg);
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-md);
  padding: .65rem .75rem;
}
.stat-lbl {
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  margin-bottom: .25rem;
}
.stat-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--fl-text);
  line-height: 1;
}
.stat-sub {
  font-size: .67rem;
  color: var(--color-text-muted);
  margin-top: .18rem;
}

/* shrinkage row spans full width */
.stat-cell.wide { grid-column: span 2; }
.shrink-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.shrink-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}
.shrink-bar {
  height: 100%;
  background: var(--fl-text);
  border-radius: 4px;
  transition: width .3s;
}

/* ---- Scouring tips card ---- */
.tips-card {
  background: var(--color-surface);
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.125rem;
}
.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.tips-list li {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .83rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.tip-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fl-bg);
  border: 1.5px solid var(--fl-border);
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 800;
  color: var(--fl-text);
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .app-wrap { flex-direction: column; }
  .pane-in  { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 440px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-cell.wide { grid-column: span 1; }
}
