/* 天一 H5 统一入口 · 261019
   只负责导航与新增板块；查分页原有样式仍留在页面内。 */

.ty-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0 -16px 14px;
  padding: 8px 16px calc(8px + env(safe-area-inset-top));
  border-bottom: 1px solid rgba(227, 231, 223, 0.9);
  background: rgba(245, 246, 242, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ty-nav-btn {
  appearance: none;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 6px;
  transition: background 0.16s ease, color 0.16s ease;
}

.ty-nav-btn:hover {
  color: var(--jade);
  background: rgba(234, 244, 239, 0.7);
}

.ty-nav-btn.is-active {
  color: #ffffff;
  background: var(--jade);
  box-shadow: 0 4px 12px rgba(15, 92, 74, 0.18);
}

.ty-nav-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.ty-panel {
  animation: ty-fade 0.18s ease both;
}

@keyframes ty-fade {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.ty-sec-head {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.ty-sec-head h2 {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.ty-sec-head .lede {
  margin: 0;
}

.ty-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 18px;
}

.ty-kpi {
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcf9;
  text-align: center;
}

.ty-kpi b {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.ty-kpi span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.ty-direction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 20px;
}

.ty-direction {
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.ty-direction h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-size: 14px;
}

.ty-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ty-dot.phy { background: #2f6fd6; }
.ty-dot.his { background: #d07a34; }

.ty-direction dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 8px;
  margin: 0;
  font-size: 11.5px;
}

.ty-direction dt { color: var(--muted); }
.ty-direction dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ty-block {
  margin: 0 0 22px;
}

.ty-block h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

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

/* 分数段双方向条形 */
.ty-seg {
  display: grid;
  gap: 7px;
}

.ty-seg-row {
  display: grid;
  grid-template-columns: 56px 1fr 68px;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
}

.ty-seg-label {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ty-seg-bars {
  display: grid;
  gap: 2px;
}

.ty-seg-bar {
  display: block;
  height: 7px;
  min-width: 1px;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.ty-seg-bar.phy { background: #2f6fd6; }
.ty-seg-bar.his { background: #d07a34; }

.ty-seg-val {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.ty-legend {
  display: flex;
  gap: 12px;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 10.5px;
}

.ty-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-radius: 3px;
  vertical-align: -1px;
}

.ty-legend .phy { background: #2f6fd6; }
.ty-legend .his { background: #d07a34; }

/* 方向切换 */
.ty-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f6f2;
}

.ty-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 13px;
}

.ty-switch button.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 35, 31, 0.1);
}

.ty-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.ty-table th {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}

.ty-table td {
  padding: 7px 6px;
  border-bottom: 1px solid #f0f2ed;
}

.ty-table tr:last-child td { border-bottom: 0; }
.ty-table .num { text-align: right; }

/* 校均分 */
.ty-school-row {
  display: grid;
  grid-template-columns: 44px 1fr 92px;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 10.5px;
}

.ty-school-code {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.ty-school-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1ea;
}

.ty-school-fill {
  height: 100%;
  border-radius: 999px;
}

.ty-school-fill.phy { background: #2f6fd6; }
.ty-school-fill.his { background: #d07a34; }

.ty-school-meta {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.ty-summary {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcf9;
}

.ty-summary li {
  margin: 0 0 8px 17px;
  font-size: 12.5px;
  line-height: 1.7;
}

.ty-summary li:last-child { margin-bottom: 0; }

.ty-cta {
  width: 100%;
  margin-top: 4px;
}

/* 资讯 */
.ty-news-list {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
}

.ty-news-item {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.ty-news-item:hover {
  border-color: #bcd8cb;
  transform: translateY(-1px);
}

.ty-news-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.ty-news-tag {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--jade-soft);
  color: var(--jade);
  font-size: 10px;
  font-weight: 700;
}

.ty-news-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.ty-news-item b {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
  line-height: 1.5;
}

.ty-news-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ty-news-empty {
  padding: 22px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* 我的 */
.ty-me-box {
  padding: 16px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcf9;
}

.ty-me-box p { margin: 0 0 8px; }
.ty-me-box p:last-child { margin-bottom: 0; }

.ty-me-box .btn { margin-top: 5px; }

.ty-history {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.ty-history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.ty-history-item b {
  font-size: 13px;
}

.ty-history-item .score {
  color: var(--jade);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ty-history-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10.5px;
}

.ty-history-empty {
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 380px) {
  .ty-kpi-grid { grid-template-columns: 1fr 1fr; }
  .ty-direction-grid { grid-template-columns: 1fr; }
  .ty-seg-row { grid-template-columns: 48px 1fr 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .ty-panel,
  .ty-news-item,
  .ty-seg-bar { animation: none; transition: none; }
}
.dj-seg{display:inline-flex;margin-top:10px;border:1px solid #dfe7e2;border-radius:999px;overflow:hidden;background:#f6f8f5}
.dj-seg button{border:0;background:transparent;padding:6px 14px;font-size:13px;color:#4a5b53;font-weight:600;cursor:pointer}
.dj-seg button.on{background:#0f5c4a;color:#fff}
.dj-panel{margin-top:10px;padding:12px;border:1px dashed #d7e2db;border-radius:10px;background:#fbfdfa;font-size:13.5px;color:#22322b}
.dj-row{display:flex;justify-content:space-between;gap:12px;margin:4px 0}
.dj-row b{font-variant-numeric:tabular-nums}
.dj-note{margin-top:8px;font-size:11.5px;color:#7c8a82;line-height:1.5}
