/* KOD DUSHI — matrix: author-layout refinement, 31 Oct 2026.
   Keeps the approved Manrope+Caveat pair and milk/beige/gold/burgundy palette.
   All SVG points are derived from the existing verified arithmetic. */

/* Headline: lighter print; larger free-flowing script below it. */
.intro-shell {
  max-width:min(1100px,calc(100% - 2px));
}
.intro-shell .matrix-page-title {
  width:100%;
  max-width:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  margin:clamp(15px,2.6vw,29px) auto 18px;
  gap:0;
  overflow:visible;
}
.intro-shell .matrix-title-print {
  display:block;
  font-family:Manrope,Arial,sans-serif;
  font-size:clamp(35px,4.65vw,62px);
  font-weight:750;
  line-height:1.05;
  letter-spacing:-.055em;
  white-space:nowrap;
}
.intro-shell .matrix-title-script {
  display:block;
  font-family:Caveat,cursive!important;
  font-size:clamp(58px,7.6vw,108px)!important;
  font-weight:400!important;
  line-height:.98!important;
  letter-spacing:-.012em;
  white-space:nowrap;
  width:max-content;
  max-width:none;
  margin-top:-.04em;
  color:#905b67;
  transform:translateX(5.5%) rotate(-2deg);
}
.intro-shell .intro-text{
  max-width:960px;
  width:100%;
  margin:0 auto;
  font-size:clamp(13px,1.12vw,16px);
  line-height:1.66;
  text-align:center;
  text-wrap:pretty;
  letter-spacing:0;
}

/* Rich but restrained interpretation of the approved Variant 1 geometry. */
.matrix-visual{
  background:linear-gradient(135deg,#faf1e5,#fffaf2)!important;
  border-color:#e4d3b6!important;
  box-shadow:0 20px 54px rgba(77,14,19,.07),inset 0 1px 0 #fffefb;
}
.matrix-chart-viewport{
  background:radial-gradient(ellipse at 45% 35%,#fffefa 3%,#f7ebdc 65%,#efdfcf 100%);
  border:1px solid #d9c4a5;
  box-shadow:inset 0 2px 22px rgba(116,79,57,.07),0 8px 18px rgba(88,57,45,.06);
}
.matrix-wheel-variant-one{
  background:radial-gradient(circle at 50% 40%,#fffefa,#faefdf 85%)!important;
  filter:drop-shadow(0 3px 6px rgba(77,14,19,.07));
}
.matrix-wheel-variant-one .matrix-node{
  cursor:pointer;
  filter:drop-shadow(0 2px 3px rgba(77,14,19,.12));
}
.matrix-wheel-variant-one .matrix-interactive-point{
  cursor:pointer;
  transition:filter .2s ease;
}
.matrix-wheel-variant-one .matrix-interactive-point:hover,
.matrix-wheel-variant-one .matrix-interactive-point:focus-visible{
  filter:drop-shadow(0 0 6px rgba(143,91,62,.42));
  outline:none;
}
.matrix-wheel-variant-one .matrix-age-badge rect{
  fill:#fff8ed;
  stroke:#c6a178;
  stroke-width:1.3;
}
.matrix-wheel-variant-one .matrix-age-badge.age-midpoint rect{
  fill:#f8ece0;
  stroke:#b48e74;
}
.matrix-wheel-variant-one .matrix-age-badge text{
  font-family:Manrope,Arial,sans-serif;
  font-weight:700;
  fill:#65444c;
}
.matrix-wheel-variant-one .matrix-age-badge.age-midpoint text:last-child{
  font-weight:650;
  fill:#915d6a;
}
.matrix-wheel-variant-one .matrix-age-badge[data-age="55"] rect{
  fill:#f0ddd3;
  stroke:#915563;
  stroke-width:1.7;
}
.matrix-wheel-variant-one .matrix-age-badge[data-age="55"] text{
  fill:#4d0e13;
}

/* Age interpretation on the same panel as the diagram. */
.matrix-age-summary{
  border:1px solid rgba(162,122,99,.33);
  background:linear-gradient(145deg,#fffaf3,#f5e7dd);
  border-radius:20px;
  padding:19px 22px;
  margin:16px 0 0;
  box-shadow:inset 0 1px 0 #fff8,0 9px 20px rgba(86,55,56,.04);
}
.matrix-age-summary .age-eyebrow{
  color:#9b6972;
  font-size:11px;
  letter-spacing:.15em;
  font-weight:700;
  text-transform:uppercase;
}
.matrix-age-summary h3{
  font:650 clamp(19px,1.8vw,25px)/1.3 Manrope,Arial,sans-serif;
  color:#4d0e13;
  margin:7px 0 11px;
}
.matrix-age-summary p{
  font-size:clamp(13px,1.05vw,15px);
  line-height:1.7;
  color:#5e4750;
  margin:8px 0;
}
.matrix-ages-details{
  margin-top:12px;
  border-top:1px solid rgba(128,93,90,.18);
  padding-top:10px;
}
.matrix-ages-details summary{
  cursor:pointer;
  color:#6e3f50;
  font-size:13px;
  padding:7px 0;
}
.matrix-ages-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-top:9px;
}
.matrix-ages-grid button{
  appearance:none;
  border:1px solid rgba(165,124,105,.3);
  background:#fffaf4;
  border-radius:12px;
  padding:8px 5px;
  font-family:Manrope,Arial,sans-serif;
  font-size:11px;
  line-height:1.35;
  color:#60464d;
  cursor:pointer;
  text-align:center;
}
.matrix-ages-grid button:hover,
.matrix-ages-grid button:focus-visible{
  outline:2px solid #b58980;
  outline-offset:1px;
}
.matrix-ages-grid button[aria-pressed="true"]{
  background:#f3dfda;
  border-color:#aa7481;
  color:#4d0e13;
}

/* Pythagoras: 0 is an actual count, never a fabricated personality score. */
.kod-psy-cell.is-empty{
  background:linear-gradient(145deg,#fff9f4,#f6efec);
}
.kod-psy-cell.is-empty summary strong{
  color:#89686c;
}
.kod-psy-cell .psy-count-note{
  font-size:10px;
  color:#8a6870;
  letter-spacing:0;
}
.kod-psy-cell>p{
  overflow-wrap:break-word;
}
@media(min-width:900px){
  .intro-shell .intro-text{
    max-width:985px;
  }
}
@media(max-width:760px){
  .intro-shell {
    max-width:100%;
  }
  .intro-shell .matrix-title-print {
    font-size:clamp(32px,8vw,47px);
  }
  .intro-shell .matrix-title-script{
    font-size:clamp(47px,11.2vw,73px)!important;
    max-width:calc(100vw - 36px);
    white-space:normal;
    text-align:center;
    line-height:1!important;
    transform:rotate(-2deg);
    margin-top:4px;
  }
  .intro-shell .intro-text{
    max-width:650px;
    font-size:14px;
    line-height:1.7;
  }
  .matrix-age-summary{padding:15px}
  .matrix-ages-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:420px){
  .intro-shell .matrix-title-print{font-size:clamp(30px,8.4vw,38px)}
  .intro-shell .matrix-title-script{font-size:clamp(43px,12.2vw,56px)!important}
  .matrix-ages-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kod-psy-cell .psy-count-note{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
  .matrix-wheel-variant-one .matrix-interactive-point{transition:none}
}
