/* Local Roboto. The Google stylesheet request was blocked, so the face never loaded. */
@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../assets/fonts/roboto-latin.woff2") format("woff2");
}
@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../assets/fonts/roboto-latin.woff2") format("woff2");
}

/* This is the stylesheet for /tools/markets/index.html, the S&P 500 prices tool.*/

:root {
    --navy:#1B3A4B; --ink:#1a1a1a; --muted:#5b6570; --paper:#f7f5f1;
    --line:#d8d2c8; --up:#3d6b4f; --crimson:#8b2e2e; --confluent:#cc0000;
    --green:#2bd918; --green_spline:#8FCE00; --red:#F40707; --red_spline:#F44336;
    --confluent_background:#fff0f4; --barFillGreen:#8FCE00; --barFillRed:#F44336;
    --barLineGreen:#006600; --barLineRed:#cc0000;
}

* { box-sizing: border-box; }

html, body { 
    margin:0; 
    width:100%;
    min-height:100%; 
    background:transparent; 
}

body { overflow-y: auto; }

body { 
    font-family: Arial, Helvetica, sans-serif; 
    color:var(--ink); 
}

.wrap { 
    margin:0; 
    /*padding:8px 16px 16px 8px;*/
    padding:8px 8px 8px 8px;
    min-height:100%;
    display:flex;
    flex-direction:column;
    box-sizing:border-box;
}

.kicker { 
    font-size:10px; 
    letter-spacing:.08em; 
    text-transform:uppercase; 
    color:var(--up); 
    font-weight:700; 
    margin:0 0 4px; 
}

h1 {
    font-size:22px; 
    line-height:1.2; 
    color:var(--navy); 
    margin:0 0 6px; 
}

.lede { 
    font-size:13px; 
    color:var(--muted); 
    margin:0 0 12px; 
    line-height:1.45; 
    max-width:68ch; 
}

.toolbar {
    display:flex; 
    flex-wrap:wrap; 
    gap:8px; 
    align-items:center; 
    margin:0 0 8px; 
}

.seg { 
    display:flex; 
    border:1px solid var(--line); 
    background:#fff; 
}

.seg button {
    border:0; 
    background:transparent; 
    color:var(--ink); 
    font: inherit; 
    font-size:12px;
    padding:6px 10px; 
    cursor:pointer;
}

.seg button.on { 
    background:var(--confluent); 
    color:#fff; 
}

.play {
    border:1px solid var(--confluent); 
    background:var(--confluent); 
    color:#fff;
    font: inherit; 
    font-size:12px; 
    font-weight:700; 
    letter-spacing:.04em;
    text-transform:uppercase; 
    padding:6px 14px; 
    cursor:pointer; 
    min-width:76px;
}

.play.pause { 
    background:#fff; 
    color:var(--confluent); 
}

/* Dead. Later .panel and .panel .card rules override it.
    @media (max-width: 800px) {
  .panel { grid-template-columns: 1fr; }
  .panel .card { width: 100%; max-width: none; }
  #chart { min-height: 320px; }
}
*/

.card { 
    border:1px solid var(--line); 
    background:var(--paper); 
    padding:12px 14px; 
}

.card h2 { 
    font-size:11px; 
    margin:0 0 8px; 
    color:var(--navy); 
    letter-spacing:.04em; 
    text-transform:uppercase; 
}

label { 
    display:block; 
    font-size:10px; 
    color:var(--muted); 
    margin:8px 0 2px; 
}

input[type=range]{ 
    width:100%; 
    height:16px; 
    margin:0; 
    accent-color:var(--confluent); 
}

.val { 
    font-variant-numeric:tabular-nums; 
    font-size:18px; 
    color:var(--confluent); 
    font-weight:700; 
}

.row { 
    display:flex; 
    justify-content:space-between; 
    gap:8px; 
    padding:4px 0; 
    border-top:1px 
    solid var(--line); 
    font-size:12px; 
}

.row span:last-child { 
    font-variant-numeric:tabular-nums; 
    font-weight:600; 
}

.note { 
    font-size:11px; 
    color:var(--muted); 
    margin:10px 0 0; 
    line-height:1.4; 
}

#chart { 
    width:100%; 
    height:100%;
    min-height:420px; 
    background:#fff; 
    border:1px solid #c4bdb3; 
    box-sizing:border-box; 
    overflow:hidden; 
}

/*.panel { 
    display:grid; 
    grid-template-columns: minmax(0,1fr) 260px; 
    gap:12px; 
}*/

.panel {
    display: grid;
    grid-template-columns: minmax(0,1fr) 220px;
    width: 100%;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
}

#chart .js-plotly-plot, #chart .plot-container, #chart .svg-container { 
    max-width:100%; 
    max-height:100%; 
}

.status { 
    font-size:11px; 
    color:var(--muted); 
}

/* Chart-view tabs. Tab 1 = live Shiller S&P. Tabs 2–6 labeled, not wired. */
.cr-chart-tab-nav {
    display:flex;
    flex-wrap:wrap;
    gap:0;
    /*margin:0 0 10px;*/
    margin:0 0 20px;
    border-bottom:1px solid var(--line);
    width:100%;
}

.cr-chart-tab-nav button {
    border:0;
    border-bottom:2px solid transparent;
    background:transparent;
    color:var(--muted);
    font: inherit;
    font-size:12px;
    font-weight:600;
    letter-spacing:.02em;
    padding:8px 14px 7px;
    margin-bottom:-1px;
    cursor:pointer;
}

.cr-chart-tab-nav button:hover { color:var(--navy); }
.cr-chart-tab-nav button.on {
    color:var(--confluent);
    border-bottom-color:var(--confluent);
}

.cr-chart-tab-nav button[aria-disabled="true"] { cursor:default; }
    @media (max-width: 600px) {
    .cr-chart-tab-nav button { padding:8px 10px 7px; font-size:11px; }
}

.quad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin: 10px 0 0;
}

.quad {
    border: 1px solid #c4bdb3;
    background: #fff;
    /*min-height: 160px;*/
    min-height: 360px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.quad h2 {
    font-size: 11px;
    margin: 0 0 4px;
    color: var(--navy);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.quad .quad-kicker {
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 10px;
    line-height: 1.35;
}

#quadReturns,
#quadGrowth,
#quadSectors,
#quadDist {
    width: 100%;
    height: 350px;
    min-height: 350px;
    background: #fff;
    border: 1px solid #c4bdb3;
    overflow: hidden; /* keeps Plotly from covering the border */
}

.quad-empty {
    flex: 1 1 auto;
    min-height: 88px;
    border: 1px dashed var(--line);
    background: var(--paper);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
}

.cr-div-tool-bottom-border {
    padding: 0 8px;
    margin-top: 8px;
    max-width: 100%;
}

.cr-hr-tool-bottom-border {
    margin:0; 
    border:0; 
    border-bottom:1px solid var(--line);
}

.stickyHeader {
    /*position: sticky;*/
    position: static; /* this replaces sticky above since we have a better sticky mirror WITHOUT deleting element */
    top: 0;
    z-index: 20;
    background: #fff0f4;  /*match the page background */
    /*background: rgba(255,0,0,0.06);*/
    padding-bottom: 8px;
    font-family: Roboto, Helvetica, Arial, sans-serif;
}

#quadSectorsKicker {
    padding: 1px 0;
}

/* this fixes the large dynamic price chart on smartphone and tablet view */
.panel .card { 
    width: 220px; 
    max-width: 220px; 
}

@media (max-width: 800px) {
    .panel { grid-template-columns: 1fr; }
    .panel .card { width: 100%; max-width: none; }
    .quad-grid { grid-template-columns: 1fr; }
    .quad { min-height: 140px; }
    #chart { min-height: 280px; }
    html, body { overflow-y: visible; height: auto; } /* this removes the vertical scrollbar for InnerPlayerFrame */
    .stickyHeader { position: static; } /* this applies to tablet and mobile view only */
}

/*@media (max-width: 800px) {
    .quad-grid { grid-template-columns: 1fr; }
    .quad { min-height: 140px; }
}*/
