/* Position Sizing - page.css (Fullymobile dark tool template)
   - Forces dark base so translucent cards render correctly
   - Clean, non-overlapping field layout
   - Matches the “Sector Strength” look and spacing
*/

:root{
  --bg:#07101f;
  --bg-elevated:#0b1628;
  --text:#e6edf3;
  --text-muted:#9fb2c9;

  --panel-bd:rgba(255,255,255,.08);
  --panel-bd-bright:rgba(255,255,255,.13);
  --panel-bg1:rgba(255,255,255,.040);
  --panel-bg2:rgba(255,255,255,.018);

  --shadow:0 8px 32px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.30);
  --shadow-inset:inset 0 1px 0 rgba(255,255,255,.07);

  --radius-card:18px;
  --radius-field:14px;

  --cards-inner:1040px;

  --font-humanist:"Nunito Sans","Segoe UI","Gill Sans","Frutiger","Myriad Pro",Arial,sans-serif;
  --font-mono:"SF Mono","Fira Code","Fira Mono","Roboto Mono",ui-monospace,monospace;
}



body,
main.wrap,
.card,
.card h3,
header.page-head .sub,
.fmb-tool-intro li,
.ps-card label.small,
.field-help,
.guide-details summary,
.guide-copy,
#ps_note,
.stat span,
.ps-card input,
.ps-card button,
.ps-card select,
.ps-card textarea{
  font-family:var(--font-humanist);
}

.ps-card input[type=number]{
  font-family:var(--font-humanist);
  font-size:16px;
  font-weight:800;
}

.guide-copy strong,
.fmb-tool-intro strong,
.ps-card label.small,
#ps_note strong{
  font-family:var(--font-humanist);
}
/* Hard force dark base (fixes the “white page” issue) */
html,body{
  background:var(--bg) !important;
  color:var(--text) !important;
}

/* Clamp and centre content */
main.wrap{
  position:relative;
  z-index:1;
  max-width:var(--cards-inner);
  margin:0 auto;
  padding:28px 22px 52px;
  background:transparent !important;
}

/* Header */
header.page-head{
  display:grid;
  gap:10px;
  margin:6px 0 18px;
  padding-bottom:16px;
  border-bottom:1px solid var(--panel-bd);
}
header.page-head .eyebrow{
  color:rgba(96,165,250,.9);
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
}
header.page-head h1{
  font-family:var(--font-humanist);
  font-size:clamp(28px,4.2vw,44px);
  font-weight:900;
  letter-spacing:-.02em;
  line-height:1.08;
  margin:0;
}
header.page-head .sub{
  color:var(--text-muted);
  font-size:14px;
  max-width:72ch;
}

/* Core cards */
.card{
  background:linear-gradient(160deg,var(--panel-bg1) 0%,var(--panel-bg2) 100%);
  border:1px solid var(--panel-bd);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow),var(--shadow-inset);
  padding:18px 20px;
  position:relative;
  overflow:hidden;
}
.card + .card{margin-top:14px}
.card h3{
  margin:0 0 12px;
  font-size:16px;
  font-weight:900;
  letter-spacing:-.01em;
}

/* Intro bullets */
.fmb-tool-intro{margin-top:12px}
.fmb-tool-intro .grid2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:8px;
}
@media(max-width:980px){
  .fmb-tool-intro .grid2{grid-template-columns:1fr}
}

.fmb-tool-intro ul{margin:0;padding-left:0;list-style:none}
.fmb-tool-intro li{
  margin:10px 0;
  color:var(--text-muted);
  font-size:13.5px;
  line-height:1.55;
  padding-left:14px;
  position:relative;
}
.fmb-tool-intro li::before{
  content:"";
  position:absolute;
  left:0;
  top:9px;
  width:6px;
  height:6px;
  border-radius:2px;
  background:rgba(96,165,250,.65);
}

/* Inputs and Outputs grid */
.ps-grid2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px 18px;
  align-items:start;
}
@media(max-width:980px){
  .ps-grid2{grid-template-columns:1fr}
}

/* Each label acts like a field-card (prevents seams/overlap look) */
.ps-card label.small{
  display:block;
  min-width:0;
  box-sizing:border-box;

  color:var(--text-muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;

  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius-field);
  padding:12px 14px;
}

/* Inputs */
.ps-card input[type=number]{
  box-sizing:border-box;
  display:block;
  width:100%;
  margin-top:8px;

  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  padding:11px 12px;

  color:var(--text);
  outline:none;
}
.ps-card input[type=number]:focus{
  border-color:rgba(96,165,250,.55);
  box-shadow:0 0 0 3px rgba(96,165,250,.12);
}

/* Output tiles */
.stat{
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius-field);
  padding:12px 14px;

  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;

  min-height:46px;
}
.stat span{
  color:var(--text-muted);
  font-size:12px;
  font-weight:800;
}
.stat b{
  font-family:var(--font-mono);
  font-weight:900;
  letter-spacing:-.02em;
  font-size:14px;
}

#ps_note{
  margin-top:10px;
  color:var(--text-muted);
  font-size:13px;
  line-height:1.5;
}

/* Footer clamp alignment */
footer{
  max-width:var(--cards-inner);
  margin-left:auto;
  margin-right:auto;
}

.field-help{
  display:block;
  margin-top:6px;
  color:var(--text-muted);
  font-size:11px;
  font-weight:700;
  line-height:1.45;
}

.ps-guide-card{margin-top:14px}
.guide-details summary{
  cursor:pointer;
  list-style:none;
  font-size:15px;
  font-weight:900;
}
.guide-details summary::-webkit-details-marker{display:none}
.guide-details summary::after{
  content:'+';
  float:right;
  color:rgba(96,165,250,.9);
  font-weight:900;
}
.guide-details[open] summary::after{content:'−'}
.guide-copy{
  margin-top:12px;
  color:var(--text-muted);
  font-size:13.5px;
  line-height:1.6;
}
.guide-copy p{margin:0 0 12px}


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

.ps-results-card{
  position:relative;
}
.ps-results-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  border-radius:18px 0 0 18px;
  background:rgba(255,255,255,.08);
}

.risk-badge{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--text-muted);
}

.risk-neutral::before,.risk-conservative::before,.risk-moderate::before,.risk-aggressive::before{
  background:currentColor;
}
.ps-results-card.risk-neutral::before{ color:#7c8ba1; }
.ps-results-card.risk-conservative::before{ color:#34d399; }
.ps-results-card.risk-moderate::before{ color:#fbbf24; }
.ps-results-card.risk-aggressive::before{ color:#f87171; }

.risk-badge.risk-neutral{ color:#9fb2c9; }
.risk-badge.risk-conservative{ color:#34d399; background:rgba(52,211,153,.10); border-color:rgba(52,211,153,.28); }
.risk-badge.risk-moderate{ color:#fbbf24; background:rgba(251,191,36,.10); border-color:rgba(251,191,36,.26); }
.risk-badge.risk-aggressive{ color:#f87171; background:rgba(248,113,113,.10); border-color:rgba(248,113,113,.28); }

#ps_maxRisk{
  font-size:18px;
}
.ps-results-card.risk-conservative #ps_maxRisk{ color:#34d399; }
.ps-results-card.risk-moderate #ps_maxRisk{ color:#fbbf24; }
.ps-results-card.risk-aggressive #ps_maxRisk{ color:#f87171; }
