/* $AAPL section */
.aapl { --up: #1d8a3a; --down: #d70015; --card: #fff; --soft: var(--paper-2); }
.aapl .up { color: var(--up); }
.aapl .down { color: var(--down); }
.aapl main, .aapl #main { background: var(--paper); }
.ap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.ap-top { padding: 34px 0 6px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.ap-id .tick { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--btn); background: rgba(0, 113, 227, .09); padding: 3px 10px; border-radius: 980px; margin-bottom: 8px; }
.ap-id h1 { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 0; font-weight: 700; }
.ap-quote { text-align: right; }
.ap-quote .px { font-family: var(--font-display); font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ap-quote .chg { font-size: 19px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ap-quote .meta { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.ap-tabs { position: sticky; top: var(--nav-h); z-index: 20; background: rgba(251, 251, 253, .86); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line-soft); margin-top: 14px; }
.ap-tabs .ap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ap-tabs a { padding: 13px 14px; font-size: 14.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; border-bottom: 2px solid transparent; letter-spacing: -.01em; }
.ap-tabs a:hover { color: var(--text); text-decoration: none; }
.ap-tabs a.on { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.ap-body { padding: 26px 24px 80px; }
.ap-lede { font-size: 17px; color: var(--text-2); max-width: 760px; margin: 0 0 22px; line-height: 1.5; }
.panel { background: var(--card); border: 1px solid var(--line-soft); border-radius: 20px; padding: 22px 22px 18px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.panel h2 { font-family: var(--font-display); font-size: 21px; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 650; }
.panel .sub { color: var(--text-3); font-size: 14px; margin: 0 0 14px; line-height: 1.45; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cols2 > .panel, .cols3 > .panel { margin-bottom: 0; min-width: 0; }
.cols2, .cols3 { margin-bottom: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.split > * { min-width: 0; }
.split > .panel { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; padding: 14px 16px; }
.stat .k { font-size: 12.5px; color: var(--text-3); letter-spacing: 0; }
.stat .v { font-family: var(--font-display); font-size: 23px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .n { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.kv { width: 100%; border-collapse: collapse; font-size: 15px; }
.kv td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.kv tr:last-child td { border-bottom: 0; }
.kv td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -22px; padding: 0 22px; }
.dt { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.dt th { text-align: right; font-weight: 600; font-size: 12.5px; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.dt th:first-child, .dt td:first-child { text-align: left; padding-left: 0; position: sticky; left: 0; background: var(--card); font-weight: 500; }
.dt tr:hover td { background: var(--paper); }
.dt .sep td { background: var(--soft); font-weight: 600; font-size: 12.5px; color: var(--text-2); text-align: left; }
.dt .tot td { font-weight: 650; border-top: 1px solid var(--line); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 980px; background: var(--soft); color: var(--text-2); }
.pill.up { background: rgba(29, 138, 58, .1); color: var(--up); }
.pill.down { background: rgba(215, 0, 21, .08); color: var(--down); }
.heat { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 12px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.heat th { font-weight: 600; color: var(--text-3); font-size: 11.5px; padding: 3px 0; }
.heat td { text-align: center; padding: 6px 0; border-radius: 5px; color: var(--ink); }
.heat td.y { text-align: left; background: none; color: var(--text-2); font-weight: 600; padding-left: 2px; }
.heat td.t { font-weight: 700; }
.aapl-note { font-size: 12.5px; color: var(--text-3); line-height: 1.5; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line-soft); max-width: 900px; }
.newslist { list-style: none; margin: 0; padding: 0; }
.newslist li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.newslist li:last-child { border-bottom: 0; }
.newslist a { font-weight: 600; font-size: 16px; color: var(--text); letter-spacing: -.015em; line-height: 1.3; display: block; }
.newslist small { color: var(--text-3); font-size: 12.5px; }
.bar-in { display: flex; align-items: center; gap: 8px; }
.bar-in i { display: block; height: 7px; border-radius: 4px; background: var(--btn); }
.empty-ap { padding: 80px 0; text-align: center; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.callout { background: linear-gradient(180deg, #f5f9ff, #eef5ff); border: 1px solid #d6e6ff; border-radius: 16px; padding: 14px 18px; font-size: 15px; color: #1d3a63; margin-bottom: 20px; line-height: 1.5; }
/* charts */
.chartbox { width: 100%; min-height: 120px; }
.ac { position: relative; }
.ac__wrap { position: relative; }
.ac svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.ac__tip { position: absolute; z-index: 5; pointer-events: none; background: rgba(29, 29, 31, .94); color: var(--paper-2); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; line-height: 1.5; min-width: 120px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.ac__tip b { display: block; font-size: 12px; font-weight: 600; margin-bottom: 3px; color: #fff; }
.ac__tip div { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ac__tip div span { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ac__tip i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.ac__tip .ac__tot { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: 3px; padding-top: 3px; }
.ac__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); margin: 0 0 8px; }
.ac__lg { display: inline-flex; align-items: center; gap: 6px; }
.ac__lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ac__empty { color: var(--text-3); padding: 40px 0; text-align: center; margin: 0; }
.ac__ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 9px; padding: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 7px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); font-weight: 600; }
.ac__toggles { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); }
.ac__toggles label { display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
.ac__reset { border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; font-size: 13px; padding: 4px 10px; cursor: pointer; }
.ac__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-height: 34px; margin: 6px 0 2px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ac__big { font-family: var(--font-display); font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.ac__muted { color: var(--text-3); }
.ac__ohlc { color: var(--text-2); font-size: 13px; }
.ac--donut { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.ac__donutwrap svg { width: 200px; max-width: 100%; }
.ac__donutlist { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 190px; font-size: 14.5px; }
.ac__donutlist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); cursor: default; }
.ac__donutlist li:last-child { border-bottom: 0; }
.ac__donutlist i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ac__donutlist .v { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .cols2, .cols3, .split { grid-template-columns: 1fr; }
  .ap-quote { text-align: left; }
}
@media (max-width: 600px) {
  .ap { padding: 0 16px; }
  .panel { padding: 18px 16px 14px; border-radius: 16px; }
  .tscroll { margin: 0 -16px; padding: 0 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 20px; }
  .ac__toggles { gap: 4px 10px; }
}
