/*
 * Piyasa Vizyon — halka arz (IPO) components.
 * Own namespace (.pvi-*) so it does not fight the legacy .pv-ipo-* override
 * stack in pv-v7.css. Loaded only on IPO pages and the front page.
 */
:root {
  --pvi-blue: #0758c9;
  --pvi-blue-soft: #eaf2ff;
  --pvi-ink: #10203b;
  --pvi-muted: #5b6b84;
  --pvi-line: #dce7f5;
  --pvi-surface: #ffffff;
  --pvi-tint: #f6f9fe;
  --pvi-radius: 18px;
  --pvi-shadow: 0 10px 30px rgba(6, 27, 61, .06);
  --pvi-container: min(1240px, calc(100% - 32px));
}

html body .pvi-page { padding: 22px 0 64px !important; }
html body .pvi-container { width: var(--pvi-container); margin: 0 auto; }
html body .pvi-page :is(h1, h2, h3, p, dl, dd, ul) { margin: 0; }

/* Breadcrumb ------------------------------------------------------------ */
html body .pvi-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--pvi-muted); margin: 0 0 14px; }
html body .pvi-breadcrumb a { color: var(--pvi-muted); text-decoration: none; }
html body .pvi-breadcrumb a:hover { color: var(--pvi-blue); }
html body .pvi-breadcrumb a::after { content: "/"; margin-left: 6px; color: #a9b7cc; }
html body .pvi-breadcrumb [aria-current] { color: var(--pvi-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }

/* Page head ------------------------------------------------------------- */
html body .pvi-page-head { background: var(--pvi-surface); border: 1px solid var(--pvi-line); border-radius: 22px; box-shadow: var(--pvi-shadow); padding: 28px 32px; }
html body .pvi-eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pvi-blue); margin-bottom: 8px; }
html body .pvi-page-head h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -.02em; font-weight: 900; color: var(--pvi-ink); }
html body .pvi-page-head p { margin-top: 12px; max-width: 78ch; font-size: 16px; line-height: 1.6; color: #34445c; }
html body .pvi-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
html body .pvi-jump a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pvi-line); background: var(--pvi-tint); color: var(--pvi-ink); font-size: 14px; font-weight: 700; text-decoration: none; }
html body .pvi-jump a:hover { border-color: var(--pvi-blue); color: var(--pvi-blue); }

/* Sections -------------------------------------------------------------- */
html body .pvi-section { margin-top: 30px; }
html body .pvi-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
html body .pvi-section-head h2 { font-size: 22px; line-height: 1.2; font-weight: 900; color: var(--pvi-ink); letter-spacing: -.01em; }
html body .pvi-section-head p { font-size: 14px; color: var(--pvi-muted); }
html body .pvi-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 8px; margin-left: 4px; border-radius: 999px; background: var(--pvi-blue-soft); color: var(--pvi-blue); font-size: 13px; font-weight: 800; vertical-align: 3px; }
html body .pvi-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 15px; font-weight: 800; color: var(--pvi-blue) !important; text-decoration: none; }
html body .pvi-more:hover { text-decoration: underline; }
html body .pvi-empty { padding: 22px; border: 1px dashed var(--pvi-line); border-radius: var(--pvi-radius); background: var(--pvi-surface); color: var(--pvi-muted); font-size: 15px; }

/* Card grid ------------------------------------------------------------- */
html body .pvi-grid { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
html body .pvi-grid > li { list-style: none !important; margin: 0 !important; padding: 0 !important; min-width: 0; }
html body .pvi-card { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; height: 100%; padding: 16px; background: var(--pvi-surface); border: 1px solid var(--pvi-line); border-radius: var(--pvi-radius); transition: border-color .15s, box-shadow .15s, transform .15s; }
html body .pvi-card:hover { border-color: #9dbbe8; box-shadow: 0 12px 28px rgba(7, 88, 201, .10); }
html body .pvi-card-logo { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: #f3f7ff; border: 1px solid #e6eefa; overflow: hidden; text-decoration: none; }
html body .pvi-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; display: block; }
html body .pvi-card-logo span { font-size: 15px; font-weight: 900; color: var(--pvi-blue); letter-spacing: .02em; }
html body .pvi-card-body { min-width: 0; }
html body .pvi-card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
html body .pvi-state, html body .pvi-code { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; }
html body .pvi-code { background: var(--pvi-ink); color: #fff; letter-spacing: .04em; }
html body .pvi-card-title { font-size: 16px !important; line-height: 1.3 !important; font-weight: 800 !important; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html body .pvi-card-title a { color: var(--pvi-ink) !important; text-decoration: none !important; }
html body .pvi-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--pvi-radius); } /* whole card clickable */
html body .pvi-card-title a:hover { color: var(--pvi-blue) !important; }
html body .pvi-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, max-content)); gap: 6px 20px; margin-top: 10px !important; }
html body .pvi-facts > div { min-width: 0; }
html body .pvi-facts dt { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pvi-muted); }
html body .pvi-facts dd { margin: 2px 0 0 !important; font-size: 14px; font-weight: 700; color: var(--pvi-ink); font-variant-numeric: tabular-nums; }

/* State tones */
html body .pvi-tone-live .pvi-state { background: #e6f7ef; color: #0f7a4f; }
html body .pvi-tone-upcoming .pvi-state { background: var(--pvi-blue-soft); color: var(--pvi-blue); }
html body .pvi-tone-done .pvi-state { background: #eef1f6; color: #45556e; }
html body .pvi-tone-trading .pvi-state { background: #efeafd; color: #5a3fc0; }
html body .pvi-tone-draft .pvi-state { background: #fff4dc; color: #8a5a00; }
html body .pvi-tone-muted .pvi-state { background: #f1f1f4; color: #6b7280; }
html body .pvi-tone-live.pvi-card { border-color: #9fdcc0; }
html body .pvi-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a56d; box-shadow: 0 0 0 0 rgba(22, 165, 109, .5); animation: pvi-pulse 1.6s infinite; }
@keyframes pvi-pulse { 70% { box-shadow: 0 0 0 7px rgba(22, 165, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 165, 109, 0); } }
@media (prefers-reduced-motion: reduce) { html body .pvi-dot { animation: none; } }

/* Year navigation */
html body .pvi-years { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; padding: 14px 16px; background: var(--pvi-surface); border: 1px solid var(--pvi-line); border-radius: var(--pvi-radius); }
html body .pvi-years > span { font-size: 13px; font-weight: 800; color: var(--pvi-muted); margin-right: 4px; }
html body .pvi-years a { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 10px; border-radius: 10px; background: var(--pvi-tint); color: var(--pvi-ink); font-size: 14px; font-weight: 800; text-decoration: none; }
html body .pvi-years a small { font-size: 11px; font-weight: 700; color: var(--pvi-muted); }
html body .pvi-years a:hover, html body .pvi-years a[aria-current] { background: var(--pvi-blue); color: #fff; }
html body .pvi-years a:hover small, html body .pvi-years a[aria-current] small { color: rgba(255, 255, 255, .8); }

/* Single page ----------------------------------------------------------- */
html body .pvi-article > * + * { margin-top: 18px; }
html body .pvi-hero { background: var(--pvi-surface); border: 1px solid var(--pvi-line); border-radius: 24px; box-shadow: var(--pvi-shadow); padding: 28px 30px; }
html body .pvi-hero-id { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; align-items: center; }
html body .pvi-hero-logo { width: 96px; height: 96px; border-radius: 20px; border: 1px solid #e6eefa; background: #f3f7ff; display: grid; place-items: center; overflow: hidden; }
html body .pvi-hero-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
html body .pvi-hero-logo span { font-size: 22px; font-weight: 900; color: var(--pvi-blue); }
html body .pvi-hero h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.02em; font-weight: 900; color: var(--pvi-ink); }
html body .pvi-summary { margin-top: 18px !important; max-width: 80ch; font-size: 16px; line-height: 1.7; color: #2d3b52; }
html body .pvi-keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 20px !important; }
html body .pvi-keyfacts > div { padding: 14px 16px; border-radius: 14px; background: var(--pvi-tint); border: 1px solid #e3ecf8; }
html body .pvi-keyfacts dt { font-size: 12px; font-weight: 700; color: var(--pvi-muted); }
html body .pvi-keyfacts dd { margin: 4px 0 0 !important; font-size: 18px; line-height: 1.25; font-weight: 900; color: var(--pvi-ink); font-variant-numeric: tabular-nums; }

html body .pvi-block { background: var(--pvi-surface); border: 1px solid var(--pvi-line); border-radius: 20px; padding: 24px 26px; }
html body .pvi-block > h2 { font-size: 20px; line-height: 1.25; font-weight: 900; color: var(--pvi-ink); margin-bottom: 14px !important; }
html body .pvi-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border-top: 1px solid #edf2f9; }
html body .pvi-detail-grid > div { padding: 12px 0; border-bottom: 1px solid #edf2f9; padding-right: 16px; }
html body .pvi-detail-grid dt { font-size: 12px; font-weight: 700; color: var(--pvi-muted); }
html body .pvi-detail-grid dd { margin: 3px 0 0 !important; font-size: 15px; font-weight: 700; color: var(--pvi-ink); overflow-wrap: anywhere; }
html body .pvi-detail-grid a { color: var(--pvi-blue); }
html body .pvi-prospectus > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid #edf2f9; }
html body .pvi-prospectus dt { font-size: 14px; font-weight: 800; color: var(--pvi-ink); }
html body .pvi-prospectus dd { margin: 0 !important; font-size: 15px; line-height: 1.6; color: #2d3b52; }
html body .pvi-table-wrap { overflow-x: auto; }
html body .pvi-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
html body .pvi-table th, html body .pvi-table td { padding: 11px 12px; text-align: right; border-bottom: 1px solid #edf2f9; }
html body .pvi-table th:first-child { text-align: left; }
html body .pvi-table thead th { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--pvi-muted); background: var(--pvi-tint); }
html body .pvi-table tbody th { font-weight: 700; color: var(--pvi-ink); font-size: 15px !important; text-transform: none !important; letter-spacing: 0 !important; background: transparent !important; }
html body .pvi-table tbody td { background: transparent !important; }
html body .pvi-note { margin-top: 10px !important; font-size: 13px; color: var(--pvi-muted); }
html body .pvi-files { list-style: none !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
html body .pvi-files a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--pvi-line); border-radius: 12px; color: var(--pvi-ink); font-weight: 700; font-size: 14px; text-decoration: none; }
html body .pvi-files a::before { content: "PDF"; flex: 0 0 auto; font-size: 10px; font-weight: 900; color: #fff; background: #d64545; border-radius: 5px; padding: 3px 5px; }
html body .pvi-files a:hover { border-color: var(--pvi-blue); color: var(--pvi-blue); }
html body .pvi-faq details { border-top: 1px solid #edf2f9; }
html body .pvi-faq summary { cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative; font-size: 16px; font-weight: 800; color: var(--pvi-ink); }
html body .pvi-faq summary::-webkit-details-marker { display: none; }
html body .pvi-faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--pvi-blue); }
html body .pvi-faq details[open] summary::after { content: "–"; }
html body .pvi-faq details p { padding: 0 0 14px; font-size: 15px; line-height: 1.6; color: #2d3b52; }
html body .pvi-rich { font-size: 15px; line-height: 1.7; color: #2d3b52; }
html body .pvi-rich p + p { margin-top: 10px; }
html body .pvi-meta-line { font-size: 13px; color: var(--pvi-muted); }
html body .pvi-meta-line a { color: var(--pvi-blue); font-weight: 700; }
html body .pvi-howto { margin-top: 30px; }
html body .pvi-howto p { font-size: 15px; line-height: 1.7; color: #2d3b52; max-width: 90ch; }

/* Ads inside IPO pages: one centered slot, no double units side by side */
html body .pvi-page .pv-ipo-ad { display: flex; justify-content: center; margin: 22px auto !important; max-width: 100%; }

/* Front-page widget ----------------------------------------------------- */
html body .ipo-panel .pvi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px 4px !important; }
html body .ipo-panel .pvi-card { padding: 14px; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
html body .ipo-panel .pvi-card-logo { width: 52px; height: 52px; border-radius: 12px; }
html body .ipo-panel .pvi-card-title { font-size: 15px !important; }
html body .ipo-panel .pvi-more { display: flex; justify-content: center; margin: 12px 16px 16px; min-height: 46px; border-radius: 12px; background: var(--pvi-blue); color: #fff !important; text-decoration: none; }
html body .ipo-panel .pvi-more:hover { background: #0649a8; text-decoration: none; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 760px) {
  html body .pvi-page { padding-top: 14px !important; }
  html body .pvi-container { width: calc(100% - 20px); }
  html body .pvi-page-head, html body .pvi-hero { padding: 20px 18px; border-radius: 18px; }
  html body .pvi-grid, html body .ipo-panel .pvi-grid { grid-template-columns: 1fr; gap: 10px; }
  html body .ipo-panel .pvi-grid { padding: 10px 10px 2px !important; }
  html body .pvi-card { grid-template-columns: 52px minmax(0, 1fr); padding: 14px; }
  html body .pvi-card-logo { width: 52px; height: 52px; }
  html body .pvi-hero-id { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
  html body .pvi-hero-logo { width: 64px; height: 64px; border-radius: 14px; }
  html body .pvi-keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .pvi-keyfacts dd { font-size: 16px; }
  html body .pvi-block { padding: 18px; border-radius: 18px; }
  html body .pvi-prospectus > div { grid-template-columns: 1fr; gap: 4px; }
  html body .pvi-table { font-size: 13px; }
  html body .pvi-table th, html body .pvi-table td { padding: 9px 8px; }
  html body .pvi-jump a { min-height: 36px; font-size: 13px; }
}
