/* The Grove House (/blog/grove-house). Tokens from tokens.css. Square corners throughout. */

/* The house fills the page; the panel floats over its right side. */
.gh-explorer {
  position: relative;
  height: calc(100vh - 61px);
  height: calc(100svh - 61px);
  min-height: 620px;
  border-bottom: 1px solid var(--ulv-stone-200);
}
.gh-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.gh-model {
  position: absolute;
  inset: 0;
  background: #f4f6f3;
  cursor: grab;
}
.gh-model:active {
  cursor: grabbing;
}
.gh-model-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--text-tertiary);
  font-size: 14px;
}
.gh-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gh-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* The heading, one line across the top of the model; it scales to fit the
   open width left of the panel. */
.gh-title {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  margin: 0;
  white-space: nowrap;
  text-align: center;
  font-size: clamp(15px, calc((100vw - 500px) / 34), 26px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--ulv-rust-600);
  pointer-events: none;
}
/* Centered over the open model, not under the panel. */
.gh-explorer:not(.gh-explorer--closed) .gh-title {
  right: 432px;
}

/* Camera controls, under the heading */
.gh-views {
  position: absolute;
  top: calc(30px + clamp(15px, calc((100vw - 500px) / 34), 26px));
  left: 16px;
  display: flex;
  background: #fff;
  border: 1px solid var(--ulv-stone-200);
  padding: 2px;
}
.gh-views button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  padding: 5px 10px;
  color: var(--text-secondary);
  cursor: pointer;
}
.gh-views button[aria-pressed="true"] {
  background: var(--ulv-forest-800);
  color: #fff;
}
.gh-stage-label {
  position: absolute;
  top: calc(72px + clamp(16px, calc((100vw - 500px) / 23), 38px));
  left: 16px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--ulv-stone-200);
  padding: 4px 8px;
}
.gh-stage-hint,
.gh-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--ulv-stone-200);
  padding: 6px 10px;
  max-width: calc(100% - 440px);
}
.gh-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  color: var(--text-primary);
}
.gh-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Class tile: the class color with its recovery years in it */
.gh-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 26px;
  height: 26px;
  padding: 0 4px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}
.gh-tile--sm {
  min-width: 20px;
  height: 18px;
  font-size: 10px;
}

/* The card under a tapped part */
.gh-card-pop {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: min(380px, calc(100% - 32px));
  max-height: 60%;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--ulv-stone-300);
  padding: 12px 14px;
}
.gh-pop-close {
  float: right;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 0 0 8px;
}
.gh-pop-line + .gh-pop-line {
  border-top: 1px solid var(--ulv-stone-150);
  margin-top: 10px;
  padding-top: 10px;
}
.gh-pop-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.gh-pop-figs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-primary);
}
.gh-pop-figs strong {
  color: var(--ulv-forest-600);
}
.gh-pop-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}
.gh-pop-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gh-pop-more {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* The panel */
.gh-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: 400px;
  background: #fff;
  border: 1px solid var(--ulv-stone-200);
  overflow-y: auto;
}
.gh-explorer--closed .gh-panel {
  bottom: auto;
}
.gh-explorer--closed .gh-stage-hint,
.gh-explorer--closed .gh-legend {
  max-width: calc(100% - 32px);
}
.gh-panel-toggle {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ulv-stone-150);
  background: #fff;
  font: inherit;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  padding: 8px 14px;
  cursor: pointer;
}
.gh-screen {
  padding: 20px 22px 24px;
}
.gh-kicker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--ulv-rust-600);
  margin: 0 0 8px;
}
.gh-screen h1 {
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.gh-small {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 18px;
}
.gh-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 4px 0 10px;
}
.gh-link:hover {
  color: var(--ulv-rust-700);
}
.gh-link.gh-link--next {
  display: block;
  margin: 16px 0 0 auto;
}
.gh-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ulv-rust-600);
  cursor: pointer;
  margin: 0 0 14px;
}

/* The landing card: where, the numbers, the market, how */
.gh-where {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 14px;
}
.gh-where a,
.gh-fine a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gh-figs,
.gh-market {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ulv-stone-200);
  border-left: 1px solid var(--ulv-stone-200);
}
.gh-market {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gh-figs div,
.gh-market div {
  padding: 10px 12px;
  border-right: 1px solid var(--ulv-stone-200);
  border-bottom: 1px solid var(--ulv-stone-200);
}
.gh-market div {
  padding: 8px 8px;
}
.gh-figs dt,
.gh-market dt {
  font-size: 11px;
  color: var(--text-secondary);
}
.gh-figs dd {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-primary);
}
.gh-figs .gh-figs-roi {
  color: var(--ulv-forest-600);
}
.gh-market dd {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}
.gh-fine {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-tertiary);
  margin: 6px 0 16px;
}
.gh-how {
  margin: 0 0 18px;
  padding-left: 18px;
}
.gh-how li {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Room rings on the main card */
.gh-rings {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ulv-stone-150);
  border-left: 1px solid var(--ulv-stone-150);
}
.gh-rings button {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--ulv-stone-150);
  border-bottom: 1px solid var(--ulv-stone-150);
  background: #fff;
  font: inherit;
  padding: 10px 4px;
  cursor: pointer;
}
.gh-rings button:hover {
  background: var(--ulv-forest-50);
}
.gh-ring-label {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}
.gh-ring-dollars {
  font-size: 11px;
  color: var(--text-secondary);
}
.gh-ring-later {
  stroke: var(--ulv-rust-400);
}
.gh-ring-group {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.gh-ring-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.gh-key {
  width: 10px;
  height: 10px;
}
.gh-key--now {
  background: var(--ulv-forest-600);
}
.gh-key--later {
  background: var(--ulv-rust-400);
  margin-left: 10px;
}
.gh-ring-arc {
  stroke: var(--ulv-forest-600);
  transition: stroke-dasharray 0.7s ease;
}
.gh-ring-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  fill: var(--text-primary);
}

/* A room */
.gh-room-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.gh-room-head h2 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.gh-room-head .gh-kicker {
  margin-bottom: 4px;
}
.gh-dek-sm {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.gh-switch {
  display: flex;
  border: 1px solid var(--ulv-stone-300);
  padding: 2px;
  margin-bottom: 12px;
}
.gh-switch button {
  flex: 1;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  padding: 6px 8px;
  color: var(--text-secondary);
  cursor: pointer;
}
.gh-switch button[aria-pressed="true"] {
  background: var(--ulv-forest-800);
  color: #fff;
}
.gh-room-dollars {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.gh-choices {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ulv-stone-150);
}
.gh-choices > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--ulv-stone-150);
}
.gh-choice-what {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  padding: 0 0 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
}
.gh-choice-what:hover,
.gh-choice-what[aria-pressed="true"] {
  color: var(--ulv-forest-600);
}
.gh-factor + .gh-factor {
  margin-top: 8px;
}
.gh-factor-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.gh-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.gh-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ulv-stone-150);
  background: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
  padding: 7px 8px;
  cursor: pointer;
}
.gh-opt .gh-tile {
  margin-left: auto;
}
.gh-opt[aria-pressed="true"] {
  border-color: var(--ulv-forest-800);
  background: var(--ulv-forest-50);
}
.gh-box {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ulv-stone-400);
  position: relative;
}
.gh-opt[aria-pressed="true"] .gh-box {
  background: var(--ulv-forest-600);
  border-color: var(--ulv-forest-600);
}
.gh-opt--off {
  color: var(--text-secondary);
}
.gh-opt--off .gh-opt-text {
  text-decoration: line-through;
}
.gh-opt--off .gh-box {
  border-color: var(--ulv-rust-600);
}
.gh-opt--off .gh-box::before,
.gh-opt--off .gh-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 1.5px;
  height: 11px;
  background: var(--ulv-rust-600);
  transform: rotate(45deg);
}
.gh-opt--off .gh-box::after {
  transform: rotate(-45deg);
}
.gh-opt[aria-pressed="true"] .gh-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Insights */
.gh-tape {
  margin-bottom: 18px;
}
.gh-tape-bar {
  display: flex;
  height: 12px;
  overflow: hidden;
  gap: 2px;
}
.gh-tape-bar span {
  flex-basis: 0;
}
.gh-tape-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-primary);
}
.gh-tape-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gh-insights h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.gh-insights h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 18px 0 6px;
}
.gh-tests,
.gh-plain {
  margin: 0;
  padding-left: 18px;
}
.gh-tests li,
.gh-plain li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* Below the explorer */
.gh-close {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}
.gh-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.gh-byline img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  object-position: 50% 28%;
}
.gh-assumptions {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .gh-explorer {
    height: auto;
    min-height: 0;
  }
  .gh-stage {
    position: sticky;
    top: 61px;
    z-index: 2;
    height: 46vh;
    height: 46svh;
    border-bottom: 1px solid var(--ulv-stone-200);
  }
  .gh-panel {
    position: static;
    width: auto;
    border: 0;
    overflow: visible;
  }
  .gh-panel-toggle {
    display: none;
  }
  .gh-screen {
    padding: 18px 16px 24px;
  }
  .gh-stage-hint,
  .gh-legend {
    max-width: calc(100% - 32px);
  }
  .gh-legend {
    display: none;
  }
  .gh-card-pop {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
  }
  .gh-views button {
    padding: 5px 7px;
    font-size: 12px;
  }
  .gh-title {
    left: 12px;
    top: 12px;
    font-size: calc((100vw - 24px) / 25);
  }
  .gh-views {
    top: calc(22px + (100vw - 24px) / 25);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gh-ring-arc {
    transition: none;
  }
}
