/* ecobee design system page: spec panels rebuilt from the Dotcom Design System
   Figma file (Spacing, Colours, Buttons pages). Panels sit on the theme's card
   surface; the swatches and buttons keep ecobee's own colours in both themes. */

.eds-spec {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}

.eds-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.eds-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}

.eds-panel-title {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eds-panel-note {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.8;
}

/* Spacing: one row per token, the old Sketch name beside it, and a bar for
   each breakpoint scaled against the largest value (144px). */
.eds-spacing {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.eds-spacing th {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0 12px 10px 0;
}

.eds-spacing td {
  padding: 9px 12px 9px 0;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.eds-token { font-weight: 600; white-space: nowrap; }

.eds-was {
  color: var(--muted);
  white-space: nowrap;
}

.eds-was s { text-decoration-color: var(--accent-line); }

.eds-size {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.eds-size-val {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.eds-bar {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: #F2A7A0;
  width: calc(var(--px) / 144 * 100%);
  min-width: 4px;
}

.eds-bar--desk { background: #E3543B; }

.eds-size-wrap { display: block; flex: 1; }

/* Colour: one row per palette family. */
.eds-family {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.eds-family:first-of-type { border-top: none; padding-top: 0; }

.eds-family-name { font-weight: 600; font-size: 0.92rem; }

.eds-family-use {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.eds-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.eds-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 118px;
}

.eds-chip {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.eds-swatch-name { display: block; font-size: 0.8rem; font-weight: 500; }

.eds-swatch-hex {
  display: block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

/* Buttons: drawn on ecobee's own white canvas so they read true in dark mode. */
.eds-canvas {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 20px;
  display: grid;
  gap: 18px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.eds-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.eds-btn-size {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #686058;
  width: 100%;
  margin-bottom: -4px;
}

.eds-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid #2D2926;
  background: #FFFFFF;
  color: #2D2926;
  font-family: "Geist", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.eds-btn--lg { height: 52px; padding: 0 26px; font-size: 0.92rem; }
.eds-btn--black { background: #2D2926; color: #FFFFFF; }
.eds-btn--harbour { background: #0E4B77; border-color: #0E4B77; color: #FFFFFF; }
.eds-btn--grey { background: #686058; color: #FFFFFF; }
.eds-btn--disabled { border-color: #9A9590; color: #9A9590; }
.eds-btn--text { border-color: transparent; padding: 0 6px; }
.eds-btn svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .eds-panel { padding: 18px; }
  .eds-family { grid-template-columns: 1fr; gap: 10px; }
  .eds-spacing .eds-was-col { display: none; }
  .eds-spacing { font-size: 0.8rem; }
  .eds-spacing td, .eds-spacing th { padding-right: 8px; }
  .eds-size { min-width: 0; gap: 6px; }
  .eds-size-val { width: 24px; }
  .eds-panel-head { flex-direction: column; gap: 4px; }
}

/* Components: small rebuilds of library components (nav, product cards,
   comparison table, gallery) on the same white canvas as the buttons. */
.eds-comp-canvas { gap: 28px; padding: 24px; color: #2D2926; font-family: "Geist", sans-serif; }

.eds-comp-label {
  display: block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #686058;
  margin-bottom: 10px;
}

.eds-chev { width: 10px; height: 10px; flex-shrink: 0; }

/* Navigation */
.eds-nav-wrap {
  border: 1px solid #DCDCDA;
  border-radius: 10px;
  overflow: hidden;
}

.eds-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 20px;
  font-size: 0.78rem;
  color: #686058;
  border-bottom: 1px solid #F5F5F5;
}

.eds-nav-logo {
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: #595352;
  margin-right: 6px;
}

.eds-nav-links { display: flex; gap: 18px; flex: 1; }
.eds-nav-link { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.eds-nav-link.is-open { color: #2D2926; box-shadow: inset 0 -2px 0 #2D2926; padding-bottom: 2px; }
.eds-nav-end { display: flex; align-items: center; gap: 16px; }
.eds-nav-end svg.eds-cart { width: 18px; height: 18px; }
.eds-nav-burger { display: none; width: 20px; height: 20px; }

.eds-dropdown {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 14px;
  padding: 18px 20px 20px;
}

.eds-tile { text-align: center; font-size: 0.72rem; color: #595352; }
.eds-tile img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 8px; }

/* Product cards */
.eds-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.eds-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #F5F5F5; }
.eds-card-name { display: block; font-weight: 600; font-size: 0.82rem; margin-top: 10px; }
.eds-card-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 0.78rem; }
.eds-card-price { font-weight: 600; }
.eds-card-save { color: #AE3826; font-weight: 600; font-size: 0.72rem; }

/* Comparison table + gallery side by side */
.eds-comp-pair { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }

.eds-compare {
  border: 1px solid #DCDCDA;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.74rem;
}

.eds-compare-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  border-top: 1px solid #DCDCDA;
}

.eds-compare-row > span { padding: 11px 12px; display: flex; align-items: center; }
.eds-compare-row > span + span { justify-content: center; border-left: 1px solid #DCDCDA; text-align: center; }
.eds-compare-head { background: #F5F5F5; border-top: none; }
.eds-compare-head > span + span { border-left: none; flex-direction: column; }
.eds-compare-head strong { font-size: 0.82rem; }
.eds-compare-head small { color: #595352; font-size: 0.7rem; margin-top: 2px; }
.eds-compare-feat { color: #2877CD; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; gap: 6px; }
.eds-compare-feat .eds-chev { color: #2877CD; }
.eds-compare-note { color: #0D6B5C; }
.eds-check { width: 14px; height: 14px; color: #0D6B5C; }

.eds-compare-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #F5F5F5;
  padding: 12px;
  border-top: 1px solid #DCDCDA;
}

.eds-compare-more { color: #2877CD; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.eds-compare-foot .eds-btn { height: 30px; padding: 0 14px; font-size: 0.7rem; }

/* Gallery */
.eds-gallery-main { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #F8F8F8; }
.eds-gallery-thumbs { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.eds-gallery-thumbs img { width: 56px; height: 36px; object-fit: cover; border-radius: 4px; opacity: 0.55; }
.eds-gallery-thumbs img.is-active { opacity: 1; background: #F5F5F5; }
.eds-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.eds-dots span { width: 6px; height: 6px; border-radius: 50%; background: #DCDCDA; }
.eds-dots span.is-active { background: #2D2926; }

/* Components respond to the canvas width (container queries), so they adapt
   the same way whether the page column is wide, narrow, or on a phone. */
.eds-comp-canvas { container-type: inline-size; }

/* Let grid children shrink below their content so the scrolling rows
   (dropdown, cards) scroll inside the canvas instead of widening the page. */
.eds-spec > *, .eds-panel, .eds-comp-canvas > *, .eds-comp-pair > * { min-width: 0; }

@container (max-width: 720px) {
  .eds-nav-links, .eds-nav-signin { display: none; }
  .eds-nav { justify-content: space-between; }
  .eds-nav-burger { display: block; }
  .eds-dropdown { grid-template-columns: repeat(6, 88px); overflow-x: auto; }
  .eds-comp-pair { grid-template-columns: 1fr; }
}

@container (max-width: 480px) {
  .eds-cards { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; }
  .eds-card { scroll-snap-align: start; }
  .eds-compare-row { grid-template-columns: 1.4fr 1fr 1fr; }
  .eds-compare-row > span { padding: 10px 8px; }
  .eds-compare-feat .eds-chev { display: none; }
  .eds-card-row { flex-direction: column; gap: 2px; }
  .eds-compare-foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .eds-comp-canvas { padding: 16px; }
}

/* Outcomes: an icon list rather than cards. Tints match the proud-card icons. */
.eds-outcomes {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.eds-outcome {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.eds-outcome:last-child { border-bottom: 1px solid var(--border); }

.eds-outcome-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eds-outcome-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eds-outcome-icon--1 { background: #DBEAFE; color: #2563EB; }
.eds-outcome-icon--2 { background: #DCFCE7; color: #059669; }
.eds-outcome-icon--3 { background: #EDE9FE; color: #7C3AED; }
.eds-outcome-icon--4 { background: #FEF3C7; color: #D97706; }

.eds-outcome-title { display: block; font-weight: 600; margin-bottom: 4px; }
.eds-outcome-desc { display: block; color: var(--muted); line-height: 1.55; font-size: 0.95rem; }

.eds-learned { margin-top: 24px; }
