/* Deal page: price history card. Plain CSS (the Tailwind build is purged). */
.ph-card {
    --ph-ink: #0b1437; --ph-muted: #6b7280; --ph-line: #e5e7eb; --ph-soft: #f6f7f9; --ph-brand: #1e40af;
    --ph-good-bg: #ecfdf3; --ph-good-fg: #166534; --ph-good-bd: #bbf7d0;
    --ph-warn-bg: #fff7ed; --ph-warn-fg: #9a3412; --ph-warn-bd: #fed7aa;
    --ph-neu-bg: #f3f4f6;  --ph-neu-fg: #374151; --ph-neu-bd: #e5e7eb;
    --ph-surface: #ffffff;
}
html.dark .ph-card {
    --ph-ink: #f3f4f6; --ph-muted: #9ca3af; --ph-line: #374151; --ph-soft: #111827; --ph-brand: #93c5fd;
    --ph-good-bg: rgba(22,163,74,.14); --ph-good-fg: #86efac; --ph-good-bd: rgba(134,239,172,.3);
    --ph-warn-bg: rgba(234,88,12,.14); --ph-warn-fg: #fdba74; --ph-warn-bd: rgba(253,186,116,.3);
    --ph-neu-bg: rgba(255,255,255,.06); --ph-neu-fg: #d1d5db; --ph-neu-bd: #374151;
    --ph-surface: #1f2937;
}
.ph-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ph-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--ph-ink); letter-spacing: -0.01em; }
.ph-sub { margin: 4px 0 0; font-size: .8125rem; color: var(--ph-muted); }
.ph-verdict { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
    border: 1px solid; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.ph-verdict svg { width: 16px; height: 16px; }
.ph-verdict--good { background: var(--ph-good-bg); color: var(--ph-good-fg); border-color: var(--ph-good-bd); }
.ph-verdict--warn { background: var(--ph-warn-bg); color: var(--ph-warn-fg); border-color: var(--ph-warn-bd); }
.ph-verdict--neutral { background: var(--ph-neu-bg); color: var(--ph-neu-fg); border-color: var(--ph-neu-bd); }
.ph-note { margin: 10px 0 0; font-size: .9rem; color: var(--ph-ink); opacity: .85; }

.ph-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 18px 0 6px;
    background: var(--ph-line); border: 1px solid var(--ph-line); border-radius: 10px; overflow: hidden; }
.ph-stat { background: var(--ph-surface); padding: 12px 14px; min-width: 0; }
.ph-stat-label { font-size: .75rem; font-weight: 600; color: var(--ph-muted); text-transform: uppercase; letter-spacing: .04em; }
.ph-stat-value { margin-top: 4px; font-size: 1.375rem; font-weight: 800; color: var(--ph-ink); letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-stat-meta { margin-top: 2px; font-size: .8125rem; color: var(--ph-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-muted { color: var(--ph-muted) !important; }
.ph-strong { font-weight: 700; color: var(--ph-ink); }
@media (max-width: 520px) {
    .ph-stat { padding: 10px 10px; }
    .ph-stat-label { font-size: .6875rem; letter-spacing: .02em; }
    .ph-stat-value { font-size: 1.0625rem; }
    .ph-stat-meta { font-size: .75rem; }
}

.ph-toolbar { display: flex; justify-content: flex-end; margin: 14px 0 4px; }
.ph-range { display: inline-flex; padding: 3px; gap: 2px; background: var(--ph-soft); border: 1px solid var(--ph-line); border-radius: 8px; }
.ph-range button { min-width: 48px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent;
    font-size: .8125rem; font-weight: 600; color: var(--ph-muted); cursor: pointer; }
.ph-range button[aria-pressed="true"] { background: var(--ph-surface); color: var(--ph-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ph-range button:focus-visible, .ph-chip:focus-visible { outline: 2px solid var(--ph-brand); outline-offset: 2px; }

.ph-chart { position: relative; height: 260px; }
@media (min-width: 640px) { .ph-chart { height: 300px; } }
.ph-empty { margin: 16px 0; padding: 28px 16px; text-align: center; font-size: .9rem; color: var(--ph-muted);
    background: var(--ph-soft); border: 1px dashed var(--ph-line); border-radius: 10px; }

.ph-tip { position: absolute; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 5; min-width: 170px;
    padding: 9px 11px; background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: 8px;
    box-shadow: 0 6px 20px rgba(11,20,55,.12); font-size: .8125rem; color: var(--ph-ink); font-variant-numeric: tabular-nums; }
.ph-tip-date { font-weight: 600; color: var(--ph-muted); margin-bottom: 5px; font-size: .75rem; }
.ph-tip-best { font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 3px; white-space: nowrap; }
.ph-tip-row { display: flex; align-items: center; gap: 7px; line-height: 1.6; white-space: nowrap; }
.ph-tip-muted { color: var(--ph-muted); }
.ph-tip-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.ph-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.ph-compare-label { font-size: .8125rem; font-weight: 600; color: var(--ph-muted); margin-right: 2px; }
.ph-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 999px;
    border: 1px solid var(--ph-line); background: var(--ph-surface); color: var(--ph-ink); font-size: .8125rem; cursor: pointer; }
.ph-chip[aria-pressed="false"]:not([disabled]) { opacity: .6; }
.ph-chip[aria-pressed="false"]:not([disabled]) .ph-chip-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.ph-chip:hover:not([disabled]) { border-color: var(--ph-muted); }
.ph-chip[disabled] { cursor: default; opacity: .6; }
.ph-chip-name { font-weight: 600; }
.ph-chip-price { color: var(--ph-muted); font-variant-numeric: tabular-nums; }
.ph-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ph-chip[aria-pressed="false"] .ph-swatch { background: transparent !important; box-shadow: inset 0 0 0 2px var(--ph-muted); }

.ph-table { margin-top: 14px; border-top: 1px solid var(--ph-line); padding-top: 10px; }
.ph-table summary { cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--ph-brand); padding: 6px 0; }
.ph-table table { width: 100%; border-collapse: collapse; font-size: .875rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ph-table th, .ph-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ph-line); white-space: nowrap; color: var(--ph-ink); }
.ph-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ph-muted); font-weight: 600; }
.ph-table tbody th { font-weight: 600; }
.ph-table .ph-swatch { margin-right: 8px; vertical-align: middle; }

.ph-alert { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px;
    padding: 12px 14px; border-radius: 10px; background: var(--ph-soft); font-size: .9rem; color: var(--ph-ink); }
.ph-foot { margin: 6px 0 0; font-size: .75rem; color: var(--ph-muted); }
