#am-spec{
  --bg:#ffffff; --surface:#ffffff; --fg:#1b1814; --muted:#6b6358; --line:#ece5da;
  --amber:#D97706; --amber-soft:#FFF0D8; --amber-ink:#D97706;
  --neg:#b4372b; --pos:#1f7a4d; --row:#FFF8EC;
  background:var(--bg);color:var(--fg);font-size:15px;line-height:1.6;text-align:start;
}
#am-spec *,#am-spec *::before,#am-spec *::after{box-sizing:border-box}
#am-spec h2{color:var(--fg);text-wrap:balance;margin:0;line-height:1.12;letter-spacing:normal;text-transform:none}
#am-spec p{margin:0}
#am-spec .am-eyebrow{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--amber-ink);font-weight:500}
#am-spec :focus-visible{outline:2px solid var(--amber);outline-offset:2px}

/* Market picker */
#am-spec .am-picker{padding-block:0 24px}
#am-spec .am-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width:860px){#am-spec .am-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:520px){#am-spec .am-cards{grid-template-columns:1fr}}
#am-spec .am-card{all:unset;box-sizing:border-box;font-family:inherit;text-align:start;color:var(--fg);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px 18px;cursor:pointer;display:flex;flex-direction:column;gap:4px;transition:border-color .15s,background-color .15s}
#am-spec .am-card:hover{border-color:var(--amber);background:var(--surface);color:var(--fg)}
#am-spec .am-card[aria-pressed="true"]{border-color:var(--amber);background:var(--amber-soft);box-shadow:inset 0 0 0 1px var(--amber)}
#am-spec .am-card:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
#am-spec .am-card .t{font-weight:700;font-size:1.05rem;line-height:1.3}
#am-spec .am-card .d{font-size:.85rem;color:var(--muted);line-height:1.45}
#am-spec .am-card .m{font-size:.74rem;color:var(--amber-ink);margin-top:6px}

/* Explorer */
#am-spec .am-explorer{padding-block:32px 72px;scroll-margin-top:100px}
#am-spec .ex-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:16px}
#am-spec .ex-head h2{font-size:clamp(1.4rem,2.6vw,1.8rem);font-weight:800;margin-top:4px}
#am-spec .ex-head p{margin-top:6px;color:var(--muted);max-width:62ch;font-size:.92rem}
#am-spec .tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
#am-spec .switch{display:inline-flex;border:1px solid var(--line);border-radius:10px;padding:3px;background:var(--surface)}
#am-spec .switch button{all:unset;box-sizing:border-box;font-family:inherit;font-size:.85rem;font-weight:600;line-height:1.4;color:var(--muted);padding:7px 14px;border-radius:7px;cursor:pointer}
#am-spec .switch button:hover{color:var(--fg);background:none}
#am-spec .switch button[aria-pressed="true"]{background:var(--fg);color:#fff}
#am-spec .switch button:disabled{opacity:.4;cursor:not-allowed}
#am-spec .search{position:relative;width:230px;max-width:100%;margin:0}
#am-spec .search input{width:100%;font-family:inherit;height:auto;margin:0;font-size:.88rem;line-height:1.4;padding:8px 12px 8px 32px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--fg);box-shadow:none}
#am-spec .search input:focus{border-color:var(--amber);outline:none}
#am-spec .search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--muted)}
@media (max-width:560px){#am-spec .search{width:100%}}
#am-spec .livebar{display:flex;gap:10px;align-items:flex-start;font-size:.84rem;color:var(--muted);margin-bottom:14px}
#am-spec .livebar svg{flex-shrink:0;width:16px;height:16px;color:var(--amber);margin-top:3px}
#am-spec .livebar b{color:var(--fg);font-weight:600}

/* Table */
#am-spec .tbl{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
#am-spec table{border-collapse:collapse;border:0;width:100%;margin:0;font-size:.88rem;font-variant-numeric:tabular-nums;background:none}
#am-spec th,#am-spec td{padding:11px 16px;text-align:start;white-space:nowrap;border:0;border-bottom:1px solid var(--line);background:none;color:var(--fg);vertical-align:middle}
#am-spec th{font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600;background:var(--amber-soft)}
#am-spec tbody tr:last-child td{border-bottom:0}
#am-spec tbody tr:nth-child(odd) td,#am-spec tbody tr:nth-child(even) td{background:none}
#am-spec tbody tr:hover td{background:var(--row)}
#am-spec td.sym{font-weight:600}
#am-spec td.name{white-space:normal;min-width:190px;color:var(--muted)}
#am-spec td.num,#am-spec th.num{text-align:end}
#am-spec td.neg{color:var(--neg)} #am-spec td.pos{color:var(--pos)}
#am-spec td.mkt{font-size:.8rem;color:var(--muted)}
#am-spec .lev{font-weight:600}
#am-spec .lev small{font-size:.75em;color:var(--muted);font-weight:400;margin-inline-start:6px}
#am-spec .empty{padding:32px;text-align:center;color:var(--muted)}

/* Notes + trading hours under the table */
#am-spec .below{display:flex;flex-wrap:wrap;gap:12px 32px;justify-content:space-between;margin-top:14px;font-size:.84rem;color:var(--muted)}
#am-spec .below p{max-width:60ch}
#am-spec .hrs{display:grid;grid-template-columns:auto auto auto;gap:2px 16px;align-content:start;font-size:.82rem}
#am-spec .hrs .h{grid-column:1/-1;font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;color:var(--amber-ink);margin-bottom:2px}
#am-spec .hrs .g{color:var(--fg);font-size:.78rem}
#am-spec .hrs .t{color:var(--fg);text-align:end}
@media (prefers-reduced-motion:reduce){#am-spec *{transition:none!important}}


.am-terms{--fg:#1b1814;--muted:#6b6358;--line:#ece5da;overflow:hidden}
.am-terms table{
  width:calc(100% + 32px);margin:0 -16px;border:0;background:none;
  border-collapse:separate;border-spacing:16px 0;   /* the 16px gap between columns */
  font-size:.92rem;line-height:1.6;
}
.am-terms td{
  padding:10px 0;border:0;border-top:1px solid var(--line);
  vertical-align:top;text-align:start;background:none;color:var(--muted);
}
.am-terms tr:first-child td{border-top:0;padding-top:0}
.am-terms tr:nth-child(odd) td,.am-terms tr:nth-child(even) td,.am-terms tr:hover td{background:none}
.am-terms td:first-child{width:160px;font-weight:600;color:var(--fg)}

/* Mobile: term above its explanation */
@media (max-width:520px){
  .am-terms table{width:100%;margin:0;border-spacing:0}
  .am-terms table,.am-terms tbody,.am-terms tr,.am-terms td{display:block;width:100%}
  .am-terms td:first-child{width:auto;padding-bottom:0}
  .am-terms td:last-child{border-top:0;padding-top:2px}
}
.am-calc{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  font-size:.86rem;line-height:1.7;color:#1b1814;
  background:#ffffff;border:1px solid #ece5da;border-radius:8px;
  padding:12px 14px;margin:10px 0;
  overflow-x:auto;white-space:nowrap;
}
.am-calc b{color:#b4372b;font-weight:400}
