/* Plentybright Companion Design System */
:root {
  --bg: #FAF8F2;
  --surface: #FFFFFF;
  --soft: #F1F2E9;
  --sage: #EBF1EA;
  --ink: #20312C;
  --muted: #56645D;
  --edge: #D5DBD1;
  --forest: #183B33;
  --green: #24594B;
  --gold: #C48820;
  --warm-bg: #FAF7F0;
  --warm-border: #E2D5B8;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.54;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: clip;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }

.topbar {
  background: var(--forest);
  color: #FFFDF5;
  padding: 13px clamp(16px, 3vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFDF5;
  text-decoration: none;
}
.brand-link:hover { text-decoration: none; opacity: 0.94; }
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #FFF;
  object-fit: cover;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-a {
  color: #EBF2EA;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 0.89rem;
  font-weight: 600;
}
.nav-a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.nav-a.active { background: rgba(255,255,255,0.18); color: #FFF; }
.nav-cta {
  background: #E8BA4C;
  color: #1F2924;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 700;
}
.nav-cta:hover { background: #F0C660; text-decoration: none; }

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 26px clamp(16px, 3vw, 40px) 64px;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: clamp(20px, 3.2vw, 36px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  background: var(--sage);
  border: 1px solid #C8D6C9;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--forest); margin: 0; line-height: 1.18; }
h1 { font-size: clamp(1.85rem, 3.2vw, 2.55rem); margin-bottom: 10px; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
h3 { font-size: 1.08rem; color: var(--forest); margin: 0 0 6px; }
.lead { font-size: 1.02rem; color: var(--muted); margin: 0 0 18px; max-width: 58ch; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #B5C3B7;
  background: #FAFBF8;
  color: var(--forest);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--sage); text-decoration: none; }
.btn--primary { background: var(--green); border-color: var(--green); color: #FFF; }
.btn--primary:hover { background: var(--forest); }

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 14px;
}
.sec-note { font-size: 0.88rem; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > *, .grid-3 > *, .tool-grid > * { min-width: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.card--warm {
  background: var(--warm-bg);
  border-color: var(--warm-border);
  border-left: 4px solid var(--gold);
}
.thumb-box {
  background: #F6F4EC;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
}
.thumb-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cover-box { aspect-ratio: 1; background: #F5F2EA; }
.cover-box img { object-fit: cover; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--green);
  border: 1px solid #C8D6C9;
}

.video-frame { min-width: 0; max-width: 100%; }
.video-frame video {
  width: 100%;
  max-width: 100%;
  border-radius: 9px;
  background: #141A18;
  display: block;
}
.cap { font-size: 0.82rem; color: var(--muted); }

/* Interactive Controls */
.size-bar {
  background: var(--soft);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 10px;
  z-index: 15;
  box-shadow: 0 6px 20px rgba(24, 59, 51, 0.08);
  margin-bottom: 22px;
}
.size-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.size-pill {
  border: 1px solid #B3C1B5;
  background: #FFF;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.87rem;
  cursor: pointer;
}
.size-pill[aria-pressed="true"] {
  background: var(--forest);
  border-color: var(--forest);
  color: #FFF;
}

.step-list { display: flex; flex-direction: column; gap: 8px; }
.step-row {
  display: grid;
  grid-template-columns: 26px 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}
.step-row.done { background: #EEF4EE; opacity: 0.78; }
.step-row.done .step-desc { text-decoration: line-through; color: var(--muted); }
.step-chk { width: 18px; height: 18px; accent-color: var(--green); margin-top: 2px; cursor: pointer; }
.step-lbl { font-weight: 700; color: var(--green); font-size: 0.9rem; }
.step-desc { font-size: 0.94rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field { display: grid; gap: 4px; font-size: 0.84rem; font-weight: 700; color: var(--muted); min-width: 0; }
.field input, .field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 9px 10px;
  border: 1px solid #B4C1B6;
  border-radius: 7px;
  background: #FFF;
  font-size: 0.95rem;
}
.result-box {
  background: var(--sage);
  border: 1px solid #C6D5C8;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.94rem;
}

.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFF;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 0.86rem;
  max-width: 100%;
  min-width: 0;
}
.swatch-dot {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid #69766E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th { background: var(--sage); color: var(--green); text-align: left; padding: 9px 10px; border-bottom: 1px solid #C8D6C9; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #E3E8E3; }

.footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
  font-size: 0.84rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 24, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 100;
}
.modal[hidden] { display: none !important; }
.modal-card {
  background: #FFF;
  border-radius: 12px;
  max-width: 980px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 16px;
}
.modal-card img { width: 100%; max-height: 78vh; object-fit: contain; display: block; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .size-bar { position: static; }
  .step-row { grid-template-columns: 24px 1fr; }
  .step-lbl { grid-column: 2; }
  .step-desc { grid-column: 2; }
}
