.py-page { padding: 56px 0 100px; }
.py-intro { text-align: center; max-width: 52ch; margin: 0 auto 36px; }
.py-intro .hero__eyebrow { margin-bottom: 18px; }
.py-intro h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin: 0 0 10px; }
.py-intro p { color: var(--ink-soft); margin: 0; line-height: 1.6; }

.py-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; align-items: start; margin-bottom: 40px; }
.py-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.py-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.py-card__icon { width: 38px; height: 38px; border-radius: 12px; background: rgba(var(--accent-rgb, 11, 122, 85),0.1); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.py-card__icon .icon { width: 20px; height: 20px; }
.py-card__head h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0; }

.py-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 8px; }
.py-mode-row { display: flex; gap: 8px; margin-bottom: 18px; }
.py-mode { flex: 1; border: 2px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 8px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all var(--dur-fast) var(--ease); }
.py-mode:hover { border-color: var(--accent); color: var(--ink); }
.py-mode.is-active { background: var(--ink-invert); border-color: var(--ink); color: #fff; }

.py-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.py-field { display: flex; flex-direction: column; gap: 6px; }
.py-field label { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); }
.py-field input { border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; background: var(--bg); color: var(--ink); transition: border-color var(--dur-fast) var(--ease); }
.py-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 11, 122, 85),0.12); }
.py-field.is-muted input { opacity: 0.55; }

.py-result { margin-top: 18px; background: rgba(var(--accent-rgb, 11, 122, 85),0.06); border: 1px solid rgba(var(--accent-rgb, 11, 122, 85),0.2); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.py-result__label { font-size: 0.7rem; font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.py-result__formula { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); }
.py-result__value { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--accent-ink); }

.py-card--note h2 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 12px; }
.py-note { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.65; margin: 0 0 10px; }
.py-note:last-child { margin-bottom: 0; }

.py-canvas-wrap { position: relative; }
.py-canvas-wrap canvas { width: 100%; height: auto; display: block; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line); }
.py-canvas-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.py-canvas-legend span { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--a { background: var(--accent); }
.dot--b { background: #0f9d94; }
.dot--c { background: #e67e22; }

.py-section { max-width: 900px; margin: 0 auto; }
.py-section__head { text-align: center; margin-bottom: 24px; }
.py-section__head h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.py-section__head p { color: var(--ink-soft); margin: 0; font-size: 0.92rem; }
.py-triples { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.py-triple { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; text-align: center; transition: transform 150ms var(--ease), border-color var(--dur-fast) var(--ease); }
.py-triple:hover { transform: translateY(-3px); border-color: var(--accent); }
.py-triple__nums { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; color: var(--accent-ink); }
.py-triple__check { font-size: 0.75rem; color: var(--ink-soft); margin-top: 4px; }

@media (max-width: 860px) {
  .py-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .py-fields { grid-template-columns: 1fr; }
  .py-mode-row { flex-direction: column; }
}
