/* Concept-term inline trigger — base styling.
 *
 * Renders correctly even before Phase J (concept-term.js) wires up the
 * click-to-open popover. Pages using
 *
 *   <span class="concept-term" data-term="cap-rate">cap rate</span>
 *
 * get the dotted underline + brass "?" cue and a hover affordance
 * immediately. Phase J's script upgrades each span to role="button" +
 * tabindex="0" + popover behaviour without needing to change markup.
 *
 * Spec: Brief 3 — Glossary System.
 */

.concept-term{
  border-bottom: 1px dotted var(--brass, #8B6F3D);
  cursor: help;
  color: inherit;
  position: relative;
  transition: border-bottom-color .15s ease;
}
.concept-term:hover{
  border-bottom: 1px solid var(--brass, #8B6F3D);
}
.concept-term::after{
  content: "?";
  display: inline-block;
  margin-left: 2px;
  font-size: 0.7em;
  color: var(--brass, #8B6F3D);
  font-weight: 500;
  vertical-align: super;
  line-height: 1;
  opacity: 0.85;
  transition: opacity .15s ease;
}
.concept-term:hover::after,
.concept-term:focus-visible::after,
.concept-term[aria-expanded="true"]::after{ opacity: 1; }
.concept-term:focus-visible{
  outline: 2px solid var(--brass, #8B6F3D);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Popover (Phase J — concept-term.js mounts one shared element). */
.concept-popover{
  position: absolute;
  z-index: 9999;
  max-width: 320px;
  padding: 18px 20px;
  background: var(--bg-elevated, #DDD8CC);
  border: 1px solid var(--rule-default, #BFB6A4);
  border-radius: 12px;
  box-shadow: var(--shadow-soft-2, 0 4px 12px rgba(31,29,26,0.08));
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--ink-primary, #1F1D1A);
  font-size: 13px;
  line-height: 1.5;
}
.concept-popover[hidden]{ display: none; }
.concept-popover-title{
  font-family: var(--font-display, Georgia, serif);
  font-style: italic;
  font-size: 18px;
  color: var(--brass, #8B6F3D);
  margin: 0 0 8px;
  font-weight: 500;
}
.concept-popover-definition{
  font-size: 14px;
  color: var(--ink-primary, #1F1D1A);
  margin: 0 0 10px;
  line-height: 1.5;
}
.concept-popover-calculation,
.concept-popover-international{
  font-size: 13px;
  color: var(--ink-secondary, #5A554E);
  margin: 0 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-subtle, #D9D3C6);
}
.concept-popover-why{
  font-size: 13px;
  color: var(--ink-primary, #1F1D1A);
  background: var(--brass-soft, rgba(139,111,61,0.08));
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0 0;
  line-height: 1.4;
}
.concept-popover-close{
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--ink-tertiary, #8B847A);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.concept-popover-close:hover{
  background: var(--brass-soft, rgba(139,111,61,0.08));
  color: var(--ink-primary, #1F1D1A);
}
