/* Shopify pricing history. Builds on studio-luxury.css tokens and guides.css layout.
   Series colours are the validated dark categorical slots 1-3, the same as the fees calculator. */
.ph-hero { padding-bottom: 40px; }
.ph-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-top: 28px; }
.ph-dl { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--border-light); border-radius: 12px; font: 600 13px var(--font-mono); color: var(--text-main); text-decoration: none; }
.ph-dl:hover { border-color: var(--emerald-accent); color: var(--emerald-accent); }
.ph-dl:focus-visible, .ph-files a:focus-visible { outline: 2px solid var(--emerald-accent); outline-offset: 2px; }

.s1 { --c: #3987e5; } .s2 { --c: #d95926; } .s3 { --c: #199e70; }

.ph-chart-section { padding: 8px 0 24px; }
.ph-chart-card { border: 1px solid var(--border-light); background: var(--bg-card); border-radius: 22px; padding: 28px; }
.ph-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; align-items: end; }
.ph-chart-head h2 { margin: 0; font-size: 20px; color: #fff; }
.ph-chart-head p { margin: 6px 0 0; font-size: 14px; color: var(--text-dim); }
.ph-seg { display: inline-flex; border: 1px solid var(--border-light); border-radius: 12px; padding: 3px; margin: 0; background: #071714; }
.ph-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ph-seg label { padding: 9px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; min-height: 38px; display: inline-flex; align-items: center; }
.ph-seg label:hover { color: #fff; }
.ph-seg input:checked + label { background: var(--emerald-accent); color: #04110e; }
.ph-seg input:focus-visible + label { outline: 2px solid var(--emerald-accent); outline-offset: 2px; }
.ph-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 6px; font-size: 13px; color: var(--text-muted); }
.ph-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ph-legend i, .ph-tip i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); display: inline-block; }

.ph-plot { position: relative; }
.ph-chart-card .gd-caption { margin-top: 14px; }
/* Space reserved for the chart the script draws (260px when narrow, 380px when wide), so nothing shifts. */
#ph-chart { min-height: 260px; }
@media (min-width: 680px) { #ph-chart { min-height: 380px; } }
#ph-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.ph-grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.ph-base { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
.ph-axis { fill: var(--text-dim); font: 500 12px var(--font-mono); }
.ph-line { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ph-dot { fill: var(--c); stroke: var(--bg-card); stroke-width: 2; }
.ph-key { fill: var(--c); }
.ph-label { fill: var(--text-main); font: 600 13px var(--font-sans); }
.ph-cross { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.ph-tip[hidden] { display: none; }
.ph-tip { position: absolute; top: 8px; transform: translateX(-50%); pointer-events: none; display: grid; gap: 4px; min-width: 170px; padding: 10px 12px; border-radius: 10px; background: #061411; border: 1px solid var(--border-light); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); font-size: 13px; color: var(--text-muted); }
.ph-tip b { color: #fff; font-size: 13px; }
.ph-tip span { display: flex; align-items: center; gap: 8px; }
.ph-tip em { margin-left: auto; font: 600 13px var(--font-mono); font-style: normal; color: #fff; }

.ph-prices td, .ph-rates td { white-space: nowrap; }
.ph-prices td small { display: block; font-size: 12px; color: var(--text-dim); }
.ph-pname { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.ph-prices td.is-new, .ph-rates td.is-new { color: #ffc46b; font-weight: 600; background: rgba(255, 196, 107, 0.06); }
.ph-none { color: var(--text-dim); }
/* Keep the date column in view while the price table scrolls sideways on phones. */
.ph-prices th:first-child, .ph-prices td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg-card); }

.ph-changes { display: grid; gap: 0; margin-top: 20px; }
.ph-change { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-top: 1px solid var(--border-dark); scroll-margin-top: 90px; }
.ph-change:target { background: linear-gradient(90deg, rgba(45, 226, 166, 0.07), transparent); }
.ph-when { display: grid; gap: 6px; align-content: start; font-size: 13px; color: var(--text-dim); }
.ph-when time { font: 600 15px var(--font-mono); color: #fff; }
.ph-area { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--emerald-accent); border: 1px solid rgba(45, 226, 166, 0.3); border-radius: 100px; padding: 3px 9px; }
.ph-what h3 { margin: 0 0 6px; font-size: 18px; color: #fff; }
.ph-what > p { margin: 0 0 12px; }
.ph-rows { margin: 4px 0 0; }
.ph-applies { font-size: 14px; color: var(--text-muted); margin-top: 12px !important; }
.ph-src { font-size: 13px; color: var(--text-dim); margin: 10px 0 0 !important; overflow-wrap: anywhere; }
.ph-src a { color: var(--text-muted); }
.ph-src a:hover { color: var(--emerald-accent); }

.ph-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0 20px; }
.ph-files a { display: grid; gap: 6px; padding: 18px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border-dark); text-decoration: none !important; transition: border-color 0.2s ease, transform 0.2s ease; }
.ph-files a:hover { border-color: var(--emerald-accent); transform: translateY(-2px); }
.ph-files strong { font: 600 15px var(--font-mono); color: var(--emerald-accent); }
.ph-files span { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.ph-cite { margin: 12px 0 20px; padding: 16px 18px; border-radius: 12px; background: #071714; border: 1px solid var(--border-dark); overflow-x: auto; font: 500 13px/1.6 var(--font-mono); color: var(--text-main); }

.ph-faq details { border-bottom: 1px solid var(--border-dark); }
.ph-faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; font-size: 17px; font-weight: 600; color: #fff; position: relative; }
.ph-faq summary::-webkit-details-marker { display: none; }
.ph-faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 24px var(--font-mono); color: var(--emerald-accent); }
.ph-faq details[open] summary::after { content: "–"; }
.ph-faq summary:focus-visible { outline: 2px solid var(--emerald-accent); outline-offset: 4px; }
.ph-faq details p { color: var(--text-muted); padding: 0 0 20px; max-width: 70ch; line-height: 1.7; }

@media (prefers-reduced-motion: reduce) { .ph-files a { transition: none; } .ph-files a:hover { transform: none; } }
@media (max-width: 720px) {
  .ph-chart-card { padding: 18px; border-radius: 18px; }
  .ph-change { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ph-when { grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
  .ph-files { grid-template-columns: minmax(0, 1fr); }
  /* Change rows as cards, so before and after are never scrolled out of view. */
  .ph-rows, .ph-rows tbody { display: block; min-width: 0 !important; width: 100%; }
  .ph-rows thead { display: none; }
  .ph-rows tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; padding: 12px 14px; border-bottom: 1px solid var(--border-dark); }
  .ph-rows td { display: block; padding: 0; border: 0; white-space: normal; }
  .ph-rows td[data-label="Plan"] { font-weight: 700; color: #fff; }
  .ph-rows td[data-label="Before"]::before, .ph-rows td[data-label="After"]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
}
@media (forced-colors: active) { .ph-line { stroke: CanvasText; } }
