/* ===== Portfolio Home Widget ===== */

.phw-card{
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:22px;
  box-shadow:0 8px 28px rgba(15,23,42,.05);
  padding:22px;
  margin-top:18px;
  margin-bottom:20px;
}

.phw-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.phw-kicker{
  font-size:12px;
  line-height:1;
  color:#64748b;
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.phw-title{
  margin:0;
  font-size:30px;
  line-height:1.06;
  color:#0f172a;
  font-weight:800;
}

.phw-badge{
  flex:0 0 auto;
  border:1px solid rgba(15,23,42,.08);
  background:#f8fafc;
  color:#0f172a;
  border-radius:999px;
  padding:10px 14px;
  font-size:14px;
  font-weight:800;
}

/* ===== TOP METRICS ===== */

.phw-top-metrics{
  display:grid;
  grid-template-columns:repeat(4, minmax(140px, 1fr));
  gap:8px;
  margin-bottom:16px;
}

.phw-metric-card{
  border:1px solid rgba(15,23,42,.08);
  background:#fbfdff;
  border-radius:16px;
  padding:14px 16px;
}

.phw-metric-card span{
  display:block;
  font-size:12px;
  color:#64748b;
  margin-bottom:6px;
}

.phw-metric-card strong{
  display:block;
  font-size:24px;
  line-height:1.1;
  color:#0f172a;
}

.phw-metric-card em{
  display:block;
  margin-top:6px;
  font-style:normal;
  font-size:13px;
  color:#64748b;
  font-weight:700;
}

/* ===== CHART ===== */

.phw-chart-wrap{
  border:1px solid rgba(15,23,42,.08);
  background:#fbfdff;
  border-radius:18px;
  padding:14px 16px;
  margin-bottom:16px;
}

.phw-chart-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.phw-chart-meta{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  font-size:12px;
  color:#64748b;
  margin-bottom:10px;
}

.phw-chart-meta b{
  color:#0f172a;
}

.phw-chart{
  display:block;
  width:100%;
  height:250px;
}

.phw-grid-line{
  stroke:rgba(15,23,42,.08);
  stroke-width:1;
}

.phw-grid-label,
.phw-x-label{
  fill:#64748b;
  font-size:11px;
}

.phw-line-value{
  fill:none;
  stroke:#0f172a;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* ===== LAYOUT ===== */

.phw-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:16px;
}

.phw-block{
  border:1px solid rgba(15,23,42,.08);
  background:#fbfdff;
  border-radius:18px;
  padding:16px;
  min-width:0;
}

.phw-block-title{
  font-size:18px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:12px;
}

/* ===== STAT LISTS ===== */

.phw-list-stat{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.phw-stat-line{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(15,23,42,.08);
  font-size:15px;
  line-height:1.45;
}

.phw-stat-line:last-child{
  border-bottom:none;
  padding-bottom:0;
}

.phw-stat-line span{
  color:#475569;
}

.phw-stat-line strong{
  color:#0f172a;
  text-align:right;
  white-space:nowrap;
}

/* ===== MOVERS / DIVIDENDS ===== */

.phw-col-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.phw-row-card{
  padding-bottom:12px;
  border-bottom:1px solid rgba(15,23,42,.08);
}

.phw-row-card:last-child{
  border-bottom:none;
  padding-bottom:0;
}

.phw-row-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}

.phw-row-top strong{
  font-size:15px;
  line-height:1.35;
  min-width:0;
}

.phw-row-top strong a{
  word-break:break-word;
}

.phw-row-top span{
  white-space:nowrap;
}

.phw-row-sub{
  font-size:14px;
  color:#64748b;
  line-height:1.45;
}

/* ===== FINAL / EMPTY ===== */

.phw-final-box,
.phw-empty-box{
  border:1px solid rgba(15,23,42,.08);
  background:#f8fafc;
  border-radius:18px;
  padding:16px;
}

.phw-final-title,
.phw-empty-title{
  font-size:16px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:8px;
}

.phw-final-text,
.phw-empty-text{
  font-size:16px;
  line-height:1.55;
  color:#334155;
}

.phw-empty-mini,
.phw-chart-empty{
  color:#64748b;
  font-size:14px;
}

/* ===== DONUTS ===== */

.phw-donut-layout{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
}

.phw-donut-wrap{
  position:relative;
  width:140px;
  height:140px;
  margin:0 auto;
  flex:0 0 auto;
}

.phw-donut-chart{
  width:140px;
  height:140px;
  transform:rotate(-90deg);
  display:block;
}

.phw-donut-base,
.phw-donut-ring{
  fill:none;
  stroke-width:14;
}

.phw-donut-base{
  stroke:#e5e7eb;
}

.phw-donut-ring{
  stroke-linecap:butt;
}

.phw-donut-center{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  pointer-events:none;
}

.phw-donut-center strong{
  font-size:28px;
  line-height:1;
  color:#0f172a;
}

.phw-donut-center span{
  margin-top:6px;
  font-size:9px;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.phw-donut-legend{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
  max-width:260px;
  margin:0 auto;
}

.phw-donut-legend-line{
  display:grid;
  grid-template-columns:12px minmax(0, 1fr) auto;
  align-items:center;
  gap:10px;
  font-size:15px;
  color:#334155;
}

.phw-donut-legend-line strong{
  color:#0f172a;
  white-space:nowrap;
  justify-self:end;
}

.phw-dot-mini{
  width:10px;
  height:10px;
  border-radius:999px;
  flex:0 0 auto;
}

/* donut segment colors */
.seg-up{ stroke:#2563eb; background:#2563eb; }
.seg-down{ stroke:#ea580c; background:#ea580c; }
.seg-flat{ stroke:#94a3b8; background:#94a3b8; }

.seg-buy{ stroke:#16a34a; background:#16a34a; }
.seg-hold{ stroke:#2563eb; background:#2563eb; }
.seg-sell{ stroke:#dc2626; background:#dc2626; }

/* ===== STATUS BADGES ===== */

.phw-status-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  font-weight:700;
  line-height:1.2;
}

.tone-neutral{
  background:#f1f5f9;
  color:#475569;
}

.tone-warn{
  background:#fff7ed;
  color:#c2410c;
}

.tone-danger{
  background:#fef2f2;
  color:#b91c1c;
}

.tone-good{
  background:#ecfdf5;
  color:#047857;
}

/* ===== COMMON COLORS ===== */

.is-up{ color:#047857 !important; }
.is-down{ color:#b91c1c !important; }

/* ===== RESPONSIVE ===== */

@media (max-width: 980px){
  .phw-title{
    font-size:26px;
  }


  .phw-grid-2{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .phw-card{
    padding:16px;
    border-radius:18px;
  }

  .phw-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .phw-title{
    font-size:22px;
  }

  .phw-stat-line{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .phw-stat-line strong{
    text-align:right;
    white-space:nowrap;
  }


  .phw-chart{
    height:220px;
  }

  .phw-donut-legend{
    max-width:none;
  }

  .phw-donut-legend-line{
    font-size:14px;
  }

  .phw-donut-center strong{
    font-size:24px;
  }
}

/* ===== STATUS CHART ===== */

.phw-status-chart-wrap{
  position:relative;
  width:140px;
  height:140px;
  margin:0 auto 14px;
}

.phw-status-chart{
  width:140px;
  height:140px;
  transform:rotate(-90deg);
}

.phw-status-center{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

.phw-status-center strong{
  font-size:26px;
  color:#0f172a;
}

.phw-status-center span{
  font-size:12px;
  color:#64748b;
}

/* donut colors for status chart */
.phw-donut-ring.tone-neutral{
  stroke:#94a3b8;
}

.phw-donut-ring.tone-warn{
  stroke:#f59e0b;
}

.phw-donut-ring.tone-danger{
  stroke:#dc2626;
}

.phw-donut-ring.tone-good{
  stroke:#16a34a;
}

.phw-replace-card{
  padding:0 0 14px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(15,23,42,.08);
}

.phw-replace-card:last-child{
  margin-bottom:0;
  padding-bottom:0;
  border-bottom:none;
}

.phw-replace-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);
  gap:14px;
  align-items:start;
}

.phw-replace-col{
  display:grid;
  grid-template-rows:22px 28px minmax(42px,auto);
  gap:6px;
  min-width:0;
}

.phw-replace-label{
  font-size:13px;
  color:#64748b;
  line-height:22px;
}

.phw-replace-arrow{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  color:#94a3b8;
  padding-top:28px;
}

.phw-replace-ticker{
  font-size:16px;
  line-height:28px;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}

.phw-replace-sell{ color:#b42318; }
.phw-replace-buy{ color:#0a7a2f; }

.phw-replace-reason{
  font-size:14px;
  line-height:1.35;
  color:#64748b;
  overflow-wrap:anywhere;
}

.phw-replace-meta{
  padding-top:8px;
  font-size:12px;
  color:#0f172a;
}

.phw-block-head{
  display:block;
  margin-bottom:14px;
}

.phw-block-head .phw-block-title{
  margin-bottom:6px;
}

.phw-strategy-link{
  display:inline-flex;
  margin-top:6px;
  font-size:12px;
  font-weight:700;
  color:#2563eb;
  text-decoration:none;
  white-space:nowrap;
}

.phw-replace-strategy{
  margin-top:4px;
  font-size:12px;
  color:#64748b;
}

.phw-strategy-link{
  font-size:12px;
  font-weight:700;
  color:#2563eb;
  text-decoration:none;
  white-space:nowrap;
}

.phw-strategy-link:hover{
  text-decoration:underline;
}

.phw-weak-badge{
  display:inline-flex;
  align-items:center;
  margin-bottom:6px;
  padding:4px 8px;
  border-radius:999px;
  background:#fff7ed;
  color:#c2410c;
  font-size:11px;
  font-weight:800;
  line-height:1;
}

.phw-auth-box{
  margin-top:18px;
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:12px;
  max-width:680px;
}

.phw-input{
  height:46px;
  border:1px solid var(--line, #e2e8f0);
  border-radius:14px;
  padding:0 14px;
  font:inherit;
  background:#fff;
  color:var(--text, #111827);
}

.phw-btn{
  height:46px;
  border:1px solid var(--line, #e2e8f0);
  border-radius:999px;
  padding:0 18px;
  font:inherit;
  font-weight:800;
  background:#fff;
  color:var(--text, #111827);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  white-space:nowrap;
}

.phw-btn-primary{
  background:var(--brand, #2563eb);
  border-color:var(--brand, #2563eb);
  color:#fff;
}

.phw-empty-actions{
  margin-top:18px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.phw-auth-msg{
  grid-column:1 / -1;
  color:var(--muted, #64748b);
}

@media (max-width:720px){
  .phw-auth-box{
    grid-template-columns:1fr;
  }
}
/* ===== EMPTY / START STATE ===== */

.phw-start-card{
  border:1px solid rgba(15,23,42,.08);
  background:#f8fafc;
  border-radius:18px;
  padding:18px;
}

.phw-start-main{
  max-width:920px;
}

.phw-benefits{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:16px 0 18px;
}

.phw-benefit{
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius:14px;
  padding:12px;
  font-size:14px;
  font-weight:800;
  color:#0f172a;
}

.phw-empty-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.phw-btn{
  min-height:44px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:999px;
  padding:0 16px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  font-size:15px;
  font-weight:800;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  white-space:nowrap;
}

.phw-btn-primary{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}

.phw-login-box{
  margin-top:18px;
  border-top:1px solid rgba(15,23,42,.08);
  padding-top:18px;
}

.phw-login-box.is-hidden{
  display:none;
}

.phw-login-title{
  font-size:16px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:6px;
}

.phw-auth-box{
  margin-top:14px;
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:10px;
  max-width:760px;
}

.phw-input{
  width:100%;
  height:44px;
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  padding:0 13px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  font-size:15px;
}

.phw-auth-msg{
  grid-column:1 / -1;
  margin-top:4px;
  color:#64748b;
  font-size:14px;
}

@media (max-width:820px){
  .phw-benefits{
    grid-template-columns:1fr 1fr;
  }

  .phw-auth-box{
    grid-template-columns:1fr;
  }
}

@media (max-width:520px){
  .phw-benefits{
    grid-template-columns:1fr;
  }
}



  .phw-metric-card{
    padding:12px;
  }

  .phw-metric-card strong{
    font-size:22px;
  }
}
/* ===== PHW metrics responsive FINAL ===== */

.phw-top-metrics{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
  margin-bottom:16px;
}

@media (max-width: 1180px){
  .phw-top-metrics{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px){
  .phw-top-metrics{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
  }

  .phw-metric-card{
    padding:12px;
  }

  .phw-metric-card strong{
    font-size:22px;
  }
}

@media (max-width: 360px){
  .phw-top-metrics{
    grid-template-columns:1fr;
  }
}
.phw-donut-ring.tone-warning{
  stroke:#f59e0b;
}

.phw-donut-ring.tone-highrisk{
  stroke:#ef4444;
}

.phw-donut-ring.tone-trim{
  stroke:#f97316;
}

.phw-donut-ring.tone-defsell{
  stroke:#991b1b;
}






/* Portfolio chart compact meta */
.phw-chart-meta.phw-chart-meta-inline {
  display: flex;
  gap: 1.05rem;
  flex-wrap: wrap;
  align-items: center;
  margin: .55rem 0 .75rem;
  font-size: .92rem;
  line-height: 1.25;
  color: var(--muted, #64748b);
}

.phw-chart-meta.phw-chart-meta-inline b {
  color: var(--text, #0f172a);
}

/* Daily invested/growth bars inside chart */
/* Consistent donut center labels */
.phw-donut-center span,
.phw-status-center span {
  display: block;
  margin-top: .18rem;
  font-family: inherit;
  font-size: .72rem;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--muted, #64748b);
  white-space: normal;
  text-align: center;
}


/* Portfolio widget final UI cleanup */
.phw-chart-meta.phw-chart-meta-inline {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: .75rem !important;
  margin: .45rem 0 .65rem !important;
  font-size: .76rem !important;
  line-height: 1.15 !important;
  color: var(--muted, #64748b) !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
  scrollbar-width: none;
}

.phw-chart-meta.phw-chart-meta-inline::-webkit-scrollbar {
  display: none;
}

.phw-chart-meta.phw-chart-meta-inline b {
  color: var(--text, #0f172a) !important;
  font-weight: 700 !important;
}

.phw-donut-center,
.phw-status-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .08rem !important;
  text-align: center !important;
}

.phw-donut-center strong,
.phw-status-center strong {
  display: block !important;
  font-family: inherit !important;
  font-size: 1.85rem !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  color: var(--text, #0f172a) !important;
}

.phw-donut-center span,
.phw-status-center span {
  display: block !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: .74rem !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  letter-spacing: .01em !important;
  text-transform: none !important;
  color: var(--muted, #64748b) !important;
  white-space: nowrap !important;
  text-align: center !important;
}


/* Portfolio widget consistent labels */
.phw-chart-meta.phw-chart-meta-inline {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: .7rem !important;
  margin: .35rem 0 .55rem !important;
  font-size: .72rem !important;
  line-height: 1.15 !important;
  color: var(--muted, #64748b) !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
  scrollbar-width: none;
}

.phw-chart-meta.phw-chart-meta-inline::-webkit-scrollbar {
  display: none;
}

.phw-chart-meta.phw-chart-meta-inline b {
  color: var(--text, #0f172a) !important;
  font-weight: 700 !important;
}

.phw-donut-center,
.phw-status-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .08rem !important;
  text-align: center !important;
}

.phw-donut-center strong,
.phw-status-center strong {
  display: block !important;
  font-family: inherit !important;
  font-size: 1.85rem !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  color: var(--text, #0f172a) !important;
}

.phw-donut-center span,
.phw-status-center span {
  display: block !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: .74rem !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  letter-spacing: .01em !important;
  text-transform: none !important;
  color: var(--muted, #64748b) !important;
  white-space: nowrap !important;
  text-align: center !important;
}


/* Portfolio widget clean chart meta */
.phw-chart-meta.phw-chart-meta-inline {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: .7rem !important;
  margin: .35rem 0 .55rem !important;
  font-size: .72rem !important;
  line-height: 1.15 !important;
  color: var(--muted, #64748b) !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
  scrollbar-width: none;
}

.phw-chart-meta.phw-chart-meta-inline::-webkit-scrollbar {
  display: none;
}

.phw-chart-meta.phw-chart-meta-inline b {
  color: var(--text, #0f172a) !important;
  font-weight: 700 !important;
}


/* Portfolio mode block */
.phw-mode-summary {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.phw-mode-summary strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
}

.phw-mode-summary span {
  display: block;
  color: var(--muted, #64748b);
  line-height: 1.35;
}

.phw-mode-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  margin: .75rem 0 0;
  color: var(--muted, #64748b);
  font-size: .88rem;
  line-height: 1.25;
}

.phw-mode-stats b {
  color: var(--text, #0f172a);
}

.phw-mode-reasons {
  margin: .75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted, #64748b);
  font-size: .9rem;
  line-height: 1.35;
}

.phw-mode-subtitle {
  margin: .9rem 0 .45rem;
  font-weight: 700;
  font-size: .92rem;
}

.phw-cash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: .75rem;
  background: rgba(248, 250, 252, .7);
}

.phw-cash-row + .phw-cash-row {
  margin-top: .4rem;
}

.phw-cash-row div {
  min-width: 0;
}

.phw-cash-row a {
  color: inherit;
  text-decoration: none;
}

.phw-cash-row span {
  display: block;
  margin-top: .12rem;
  color: var(--muted, #64748b);
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phw-cash-row b {
  white-space: nowrap;
}


.phw-mode-hint {
  margin: -.25rem 0 .5rem;
  color: var(--muted, #64748b);
  font-size: .82rem;
  line-height: 1.3;
}


/* Portfolio mode clean decision */
.phw-mode-stats-clean {
  margin-top: .75rem;
}

.phw-mode-decision {
  margin-top: .75rem;
  padding: .75rem .85rem;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: .85rem;
  background: rgba(248, 250, 252, .78);
}

.phw-mode-decision strong {
  display: block;
  font-size: .95rem;
  line-height: 1.25;
  color: var(--text, #0f172a);
}

.phw-mode-decision span {
  display: block;
  margin-top: .25rem;
  color: var(--muted, #64748b);
  font-size: .88rem;
  line-height: 1.35;
}

.phw-event-watch {
  margin-top: .85rem;
}

.phw-event-watch.is-empty p {
  margin: .25rem 0 0;
  color: var(--muted, #64748b);
  font-size: .88rem;
  line-height: 1.35;
}

.phw-event-row {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) 1.4fr;
  gap: .75rem;
  align-items: start;
  padding: .6rem .7rem;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: .75rem;
  background: rgba(255,255,255,.72);
}

.phw-event-row + .phw-event-row {
  margin-top: .45rem;
}

.phw-event-row a {
  color: inherit;
  text-decoration: none;
}

.phw-event-row span {
  display: block;
  margin-top: .12rem;
  color: var(--muted, #64748b);
  font-size: .82rem;
}

.phw-event-row p {
  margin: 0;
  color: var(--muted, #64748b);
  font-size: .86rem;
  line-height: 1.35;
}


/* Portfolio mode compact line */
.phw-mode-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: center;
  margin: .35rem 0 .55rem;
  color: var(--muted, #64748b);
  font-size: .82rem;
  line-height: 1.25;
}

.phw-mode-inline b {
  color: var(--text, #0f172a);
  font-weight: 700;
}

.phw-mode-action-text {
  margin: .25rem 0 .7rem;
  color: var(--muted, #64748b);
  font-size: .9rem;
  line-height: 1.35;
}

/* Portfolio header stability badge */
.phw-badge.phw-score-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: auto;
  min-width: auto;
    padding: 10px 14px;
  text-align: center;
  background: transparent;
}

.phw-badge.phw-score-badge span {
  display: inline;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted, #64748b);
  white-space: nowrap;
}

.phw-badge.phw-score-badge b {
  display: inline;
  font-weight: 800;
  color: var(--text, #0f172a);
  white-space: nowrap;
}

.phw-badge.phw-score-badge.is-good {
  border-color: rgba(16, 185, 129, .65);
}

.phw-badge.phw-score-badge.is-watch {
  border-color: rgba(245, 158, 11, .7);
}

.phw-badge.phw-score-badge.is-risk {
  border-color: rgba(239, 68, 68, .7);
}


/* Portfolio event control */
.phw-event-row.is-hard {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(254, 242, 242, .45);
}

.phw-event-row.is-watch {
  border-color: rgba(245, 158, 11, .30);
  background: rgba(255, 251, 235, .45);
}

.phw-event-row.is-info {
  border-color: rgba(148, 163, 184, .28);
  background: rgba(248, 250, 252, .72);
}

.phw-event-row.is-hard strong,
.phw-event-row.is-hard a {
  color: #991b1b;
}

.phw-event-row.is-watch strong,
.phw-event-row.is-watch a {
  color: #92400e;
}
