/* Sidebar controls: sections, presets, kit cards, swatches. */
/* ============================================================
   SIDEBAR SECTIONS
   ============================================================ */
.section { display: flex; flex-direction: column; gap: 7px; }

.section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--rule);
}

/* PRESET GRID */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.preset-btn {
  background: white;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 7px 2px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-light);
  cursor: pointer;
  text-align: center;
  transition: background 0.07s, color 0.07s, border-color 0.07s;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.preset-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-pale); }
.preset-btn.active { background: var(--green); border-color: var(--green); color: white; }

/* CUSTOM DIMENSIONS */
.dim-row { display: flex; align-items: flex-end; gap: 6px; margin-top: 4px; }
.dim-field { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.dim-field label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.dim-input {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: white;
  appearance: none;
}
.dim-input:focus { outline: none; border-color: var(--green); }
.dim-x { font-size: 15px; font-weight: 300; color: var(--ink-faint); padding-bottom: 7px; }
.dim-note { font-size: 9.5px; color: var(--ink-faint); font-style: italic; }
.devflag { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid #E0A93B; background: #FBF3E0; border-radius: 6px; margin-top: 6px; }
.devflag .df-icon { color: #B7791F; font-weight: 700; line-height: 1.2; }
.devflag .df-body { font-size: 11.5px; color: #5A4A2A; line-height: 1.4; }
.devflag .df-label { font-weight: 700; color: #7A5A12; }
.devflag .df-status { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; padding: 1px 5px; border-radius: 3px; background: #E0A93B; color: #3A2A08; margin-left: 6px; }
.devflag.df-active { box-shadow: 0 0 0 2px rgba(224,169,59,0.45); }
.devflag .df-ctx { margin-top: 3px; opacity: 0.78; }

/* COURSE BUTTONS */
.course-list { display: flex; flex-direction: column; gap: 3px; }
.course-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.07s, border-color 0.07s;
  text-align: left;
  gap: 6px;
}
.course-btn:hover { border-color: var(--green); }
.course-btn.active { background: var(--green); border-color: var(--green); }
.course-btn.active .c-label,
.course-btn.active .c-depth,
.course-btn.active .c-soil { color: white !important; }
.c-left { display: flex; flex-direction: column; gap: 1px; }
.c-label { font-size: 12px; font-weight: 700; color: var(--ink); }
.c-depth { font-size: 11px; color: var(--ink-light); }
.c-soil { font-size: 10px; color: var(--ink-faint); }

/* COLOR GRID */
.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.color-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background 0.07s, color 0.07s;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-light);
  text-align: center;
  line-height: 1.3;
}
.color-btn:hover { background: var(--paper-warm); }
.color-btn:hover .color-swatch { box-shadow: 0 0 0 2px var(--rule-strong); }
.color-btn.active { color: var(--green); }
.color-btn.active .color-swatch { box-shadow: 0 0 0 2px var(--green); }
.color-btn.soon { opacity: 0.5; cursor: default; }
.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.18);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  transition: box-shadow 0.07s;
  position: relative;
  overflow: hidden;
}
/* Duotone swatch halves — same "/" diagonal on every duotone swatch.
   Each half is independently clickable and selects that color as the
   OUTSIDE face (the partner automatically shows inside). */
.duo-half {
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
}
.duo-half.duo-a { clip-path: polygon(0 0, 100% 0, 0 100%); }        /* upper-left half */
.duo-half.duo-b { clip-path: polygon(100% 0, 100% 100%, 0 100%); }  /* lower-right half */
.duo-half:hover { filter: brightness(1.12); }
.duo-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  border: 1.5px solid #fff;
  pointer-events: none;
}
.duo-dot.at-a { left: 22%; top: 22%; transform: translate(-50%,-50%); }
.duo-dot.at-b { left: 78%; top: 78%; transform: translate(-50%,-50%); }
.soon-tag { font-size: 7.5px; color: var(--amber); font-weight: 700; }

/* FINISH TOGGLE (capped / uncapped) + cap comparison */
.finish-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 7px; }
.finish-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 4px; border: 2px solid var(--rule-strong); border-radius: 4px;
  background: white; cursor: pointer; font-family: var(--sans);
  font-size: 12px; font-weight: 800; color: var(--ink-light);
  transition: border-color 0.07s, background 0.07s, color 0.07s;
}
.finish-btn:hover { border-color: var(--green); }
.finish-btn.active { border-color: var(--green); background: var(--green-pale); color: var(--green); }
.finish-sub { font-size: 8.5px; font-weight: 700; letter-spacing: 0.04em; opacity: 0.75; }
.finish-note { font-size: 10px; color: var(--ink-light); line-height: 1.4; margin-bottom: 8px; }
.cap-compare { border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.cc-head, .cc-row { display: grid; grid-template-columns: 1.05fr 1fr 1fr; align-items: center; }
.cc-head { background: var(--paper-warm); font-size: 8.5px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); }
.cc-head span, .cc-row span { padding: 5px 7px; }
.cc-row { border-top: 1px solid var(--rule); font-size: 10px; line-height: 1.3; }
.cc-row:nth-child(even) { background: var(--paper-warmer); }
.cc-feat { font-weight: 700; color: var(--ink); }
.cc-cap { color: var(--success-ink); font-weight: 700; }
.cc-unc { color: var(--ink-light); }
.cap-both { font-size: 9.5px; color: var(--ink-faint); line-height: 1.4; margin-top: 7px; }

/* BOARD PLAN CARD */
.board-plan {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.bp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
}
.bp-row:last-child { border-bottom: none; }
.bp-key { color: var(--ink-faint); }
.bp-val { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.bp-highlight { background: var(--green-pale); }

.toggle-6ft {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ink-light);
  cursor: pointer;
  padding: 4px 0;
}
.toggle-6ft input { cursor: pointer; accent-color: var(--green); }

.shipping-note {
  font-size: 10px;
  color: var(--amber);
  background: var(--amber-pale);
  border: 1px solid var(--amber-border);
  border-radius: 2px;
  padding: 5px 8px;
  line-height: 1.4;
}

/* GENERATE BUTTON */
.btn-generate {
  width: 100%;
  padding: 11px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.1s;
  margin-top: 2px;
}
.btn-generate:hover { background: var(--green-mid); }

