/* Symbols · "Periodic table": cool paper, navy ink, ten pastel families, big maths glyphs */
.t-symbols {
  --ink: #1d2a4d; --paper: #eef1f6; --card: #ffffff;
  --bg: var(--paper); --surface: #ffffff; --surface-2: #e4e9f2; --text: var(--ink); --muted: #56607a; --line: rgba(29, 42, 77, .2);
  --primary: var(--ink); --primary-ink: #ffffff; --accent: #e4572e; --accent-ink: #fff;
  --radius: 8px; --radius-sm: 6px; --btn-radius: 6px;
  --top-bg: rgba(238, 241, 246, .92); --top-border: 1px solid rgba(29, 42, 77, .2);
  --stage-bg: var(--paper); --stage-head-bg: #ffffff; --input-bg: #ffffff; --input-border: 1.5px solid rgba(29, 42, 77, .35);
  background: var(--paper);
}
.t-symbols .mu-mark { background: #CDB4DB; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px; }
.t-symbols .btn-ghost { border-color: rgba(29, 42, 77, .45); color: var(--ink); }
.t-symbols .seg { background: #fff; border-color: rgba(29, 42, 77, .3); }
.t-symbols .seg-btn.on { background: var(--ink); color: #fff; }
.t-symbols .panel { background: #fff; border: 1.5px solid rgba(29, 42, 77, .25); box-shadow: none; }
.t-symbols .small { font-size: .88rem; }
.ov { text-decoration: overline; text-decoration-thickness: .08em; }

/* hero */
.sy-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: center; padding-top: 2.6rem; padding-bottom: 1.4rem; }
.sy-intro h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.02; margin-bottom: .9rem; max-width: 14ch; }
.sy-lede { font-size: 1.15rem; max-width: 52ch; color: #36405c; }
.sy-jump { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.sy-jump a { color: var(--ink); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: rgba(29, 42, 77, .3); }
.sy-jump a:hover { text-decoration-color: var(--ink); }
.td-label { font-weight: 600; margin: 0 0 .5rem; color: var(--muted); }
.td-tile { position: relative; display: grid; width: 100%; aspect-ratio: 1; padding: 14px 16px; background: var(--c); border: 3px solid var(--ink); border-radius: 10px; color: var(--ink); text-align: left; grid-template-rows: auto 1fr auto auto; box-shadow: 8px 8px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.td-tile:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.td-tile .no { font-weight: 700; font-size: 1.2rem; }
.td-tile .tx { position: absolute; top: 16px; right: 16px; font-family: var(--font-mono); font-size: .85rem; }
.td-tile .g { font-family: var(--font-math); font-size: 6.4rem; line-height: 1; align-self: center; justify-self: center; }
.td-tile .nm { font-weight: 700; font-size: 1.2rem; }
.td-tile .fam { font-size: .85rem; opacity: .8; }
.td-mean { margin: 1.1rem 0 0; font-size: .95rem; color: #36405c; }

/* toolbar and legend */
.sy-find { position: sticky; top: 56px; z-index: 5; background: rgba(238, 241, 246, .95); backdrop-filter: blur(6px); padding-top: .8rem; padding-bottom: .4rem; border-bottom: 1px solid rgba(29, 42, 77, .12); }
.sy-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.sy-bar .inp { flex: 1 1 240px; max-width: 360px; }
.sy-btns { display: flex; gap: .5rem; margin-left: auto; }
.sy-legend { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; align-items: center; }
.sy-legend button { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .6rem; border-radius: 5px; border: 1.5px solid rgba(29, 42, 77, .3); background: #fff; font-size: .85rem; font-weight: 500; color: var(--ink); }
.sy-legend button i { width: .85rem; height: .85rem; border-radius: 3px; background: var(--c); border: 1px solid var(--ink); }
.sy-legend button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.lg-pips { margin-left: auto; font-size: .8rem; color: var(--muted); white-space: pre; }
.sy-showing { margin: .5rem 0 0; font-size: .85rem; color: var(--muted); }

/* the table */
.sy-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; padding: 1.1rem 0 1rem; }
.sym { position: relative; aspect-ratio: 1; display: grid; grid-template-rows: auto 1fr auto auto; padding: 6px 7px 5px; background: var(--c); border: 1.5px solid var(--ink); border-radius: 6px; color: var(--ink); text-align: left; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.sym:hover { transform: translateY(-3px); box-shadow: 0 5px 0 var(--ink); z-index: 1; }
.sym:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sym .no { font-size: .7rem; font-weight: 700; }
.sym .pips, .dt-fam .pips { position: absolute; top: 6px; right: 7px; font-size: .5rem; letter-spacing: 1px; }
.dt-fam .pips { position: static; font-size: .6rem; margin-left: .3rem; }
.sym .g { font-family: var(--font-math); text-align: center; align-self: center; line-height: 1; white-space: nowrap; }
.sym .g1 { font-size: 2.3rem; } .sym .g2 { font-size: 1.65rem; } .sym .g3 { font-size: 1.12rem; }
.sym .nm { font-size: .72rem; font-weight: 600; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sym .tx { font-family: var(--font-mono); font-size: .6rem; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sym[hidden] { display: none; }

/* detail card */
.sy-modal { max-width: 720px; }
.sy-detail { display: grid; grid-template-columns: 200px 1fr; gap: 1.4rem; align-items: start; }
.dt-tile { position: relative; aspect-ratio: 1; background: var(--c); border: 3px solid var(--ink); border-radius: 10px; display: grid; place-items: center; box-shadow: 6px 6px 0 var(--ink); }
.dt-tile .no { position: absolute; top: 8px; left: 10px; font-weight: 700; }
.dt-tile .g { font-family: var(--font-math); font-size: 5rem; line-height: 1; text-align: center; padding: 0 .3rem; }
.dt-fam { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--muted); margin: 0 0 .6rem; }
.dt-fam i { width: .85rem; height: .85rem; border-radius: 3px; border: 1px solid var(--ink); }
.dt-mean { font-size: 1.12rem; }
.dt-ex { background: var(--surface-2); border-radius: 6px; padding: .6rem .8rem; font-family: var(--font-math); font-size: 1.1rem; }
.dt-ex span { display: block; font-family: var(--font-body); font-size: .78rem; color: var(--muted); margin-bottom: .1rem; }
.dt-codes { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; font-size: .9rem; margin: 0 0 1rem; }
.dt-codes dt { color: var(--muted); } .dt-codes dd { margin: 0; } .dt-codes code { font-family: var(--font-mono); word-break: break-all; }
.dt-acts { gap: .5rem; }
@media (max-width: 640px) { .sy-detail { grid-template-columns: 1fr; } .dt-tile { width: 150px; } .dt-tile .g { font-size: 3.8rem; } }

/* sections */
.sy-sec { padding-top: 2.6rem; }
.sy-sec h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.015em; }
.sy-note { color: var(--muted); max-width: 62ch; }
.greek { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.gk { display: grid; gap: .1rem; text-align: left; padding: .7rem .8rem; background: #fff; border: 1.5px solid rgba(29, 42, 77, .3); border-radius: 8px; color: var(--ink); }
.gk:hover { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.gk-l { font-family: var(--font-math); font-size: 2.1rem; line-height: 1.1; }
.gk b { font-size: 1.02rem; } .gk-p { font-size: .78rem; color: var(--accent); font-weight: 600; } .gk-u { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.sets-wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.sets-svg { width: 100%; height: auto; }
.sets-svg rect { stroke: var(--ink); stroke-width: 2; }
.sets-svg .s-c { fill: #F1C0E8; } .sets-svg .s-r { fill: #A0C4FF; } .sets-svg .s-q { fill: #9BF6E3; } .sets-svg .s-z { fill: #FFD166; } .sets-svg .s-w { fill: #B5E48C; } .sets-svg .s-n { fill: #FFADAD; }
.sets-svg .s-l { font: 700 15px var(--font-body); fill: var(--ink); } .sets-svg .s-l.sm { font-size: 12.5px; }
.sets-svg .s-e { font: 500 18px var(--font-math); fill: var(--ink); }
.sets-list dt { font-weight: 700; margin-top: .6rem; } .sets-list dd { margin: .1rem 0 0; color: #36405c; }
@media (max-width: 860px) { .sets-wrap { grid-template-columns: 1fr; } }
.say-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.say { display: grid; gap: .2rem; text-align: left; padding: .65rem .85rem; background: #fff; border: 1.5px solid rgba(29, 42, 77, .3); border-radius: 8px; color: var(--ink); }
.say:hover { border-color: var(--ink); }
.say-w { font-family: var(--font-math); font-size: 1.45rem; } .say-s { font-size: .9rem; color: #36405c; }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.type-grid .tbl td { font-family: var(--font-mono); padding: .3rem .45rem; }
.type-grid .tbl td:nth-child(even) { font-family: var(--font-math); font-size: 1.1rem; text-align: center; }
@media (max-width: 900px) { .type-grid { grid-template-columns: 1fr; } }
.latex { margin-top: 1rem; }
.latex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.ltx { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .45rem .7rem; background: var(--surface-2); border: 1px solid transparent; border-radius: 6px; color: var(--ink); text-align: left; }
.ltx:hover { border-color: var(--ink); }
.ltx code { font-family: var(--font-mono); font-size: .8rem; } .ltx span { font-family: var(--font-math); font-size: 1.15rem; white-space: nowrap; }

/* quiz and flashcards */
.t-symbols .mcq-choice { background: #fff; border: 2px solid var(--ink); color: var(--ink); border-radius: 8px; }
.t-symbols .mcq-choice.good { background: #B5E48C; } .t-symbols .mcq-choice.bad { background: #FFADAD; }
.qz-ask { text-align: center; color: var(--muted); margin: 0 0 .3rem; }
.qz-big { font-family: var(--font-math); font-size: clamp(4rem, 14vw, 7rem); text-align: center; line-height: 1.1; }
.qz-name { text-align: center; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; }
.qz-g { font-family: var(--font-math); font-size: 2.2rem; }
.fc-wrap { max-width: 560px; margin: 0 auto; display: grid; gap: 1rem; }
.fc { perspective: 1200px; background: none; border: 0; padding: 0; width: 100%; aspect-ratio: 4 / 3; }
.fc-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.fc.flipped .fc-in { transform: rotateY(180deg); }
.fc-front, .fc-back { position: absolute; inset: 0; display: grid; place-content: center; gap: .7rem; padding: 1.4rem; text-align: center; border: 3px solid var(--ink); border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 8px 8px 0 var(--ink); }
.fc-front { background: var(--c); } .fc-front .g { font-family: var(--font-math); font-size: clamp(4rem, 15vw, 7rem); line-height: 1; } .fc-front small { color: rgba(29, 42, 77, .75); }
.fc-back { background: #fff; transform: rotateY(180deg); } .fc-back b { font-size: 1.6rem; } .fc-back em { font-family: var(--font-math); font-style: normal; background: var(--surface-2); padding: .4rem .7rem; border-radius: 6px; }
@media (max-width: 760px) { .sy-hero { grid-template-columns: 1fr; } .sy-today { max-width: 300px; } .sy-find { position: static; } .sy-btns { margin-left: 0; } .lg-pips { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .fc-in { transition: none; } }
#sy-table, .sy-sec { scroll-margin-top: 180px; }
