/* Data analysis page */
.an .an-sum { margin: 6px 0 10px; }
.ms-checks li.info { background: var(--surface-2); color: var(--ink-2); } .ms-checks li.info::before { content: "i"; font-style: italic; }
.an-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.an-toolbox { border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface-2); }
.an-toolbox h3 { margin: 0 0 8px; font-size: 16px; }
.an-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; max-height: 200px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13.5px; margin: 6px 0; }
.an-items label { display: flex; gap: 6px; align-items: center; }
.an-vars-wrap { overflow-x: auto; max-height: 520px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.an-vars { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.an-vars th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.an-vars td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.an-vars td:first-child { white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.an-vars input, .an-vars select { width: 100%; min-width: 120px; font-size: 13.5px; padding: 5px 7px; }
.an-vars input.unit { max-width: 160px; }
.an-vars tr.off td { color: var(--muted); }
.an-vars td.n { text-align: right; font-variant-numeric: tabular-nums; }
.an-vars .tag { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.an-plan { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.an-plan li { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.an-plan li[data-kind="figure"] { background: var(--surface-2); }
.an-no { font-weight: 600; font-size: 13.5px; color: var(--accent-2); }
.an-plan input { width: 100%; min-width: 0; padding: 6px 8px; }
.an-type { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.an-acts { display: flex; gap: 8px; }
.an-prevh { font-size: 15px; margin: 18px 0 6px; }
.an-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.an-tier { display: block; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; cursor: pointer; position: relative; background: var(--surface); }
.an-tier input { position: absolute; opacity: 0; }
.an-tier span { display: grid; gap: 4px; }
.an-tier small { color: var(--muted); font-size: 12.5px; }
.an-tier em { font-style: normal; font-weight: 700; font-size: 20px; color: var(--accent); }
.an-tier:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.an-tier.off { opacity: .6; cursor: default; }
.an-more { grid-column: 1 / -1; margin: 0; }
.an-work { margin: 24px 0 60px; }
.an-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: sticky; top: var(--hd-h); z-index: 6; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); }
.an-bar h2 { margin: 0; font-size: 21px; }
.an-bar .sp { flex: 1; }
.an-left { font-size: 13px; color: var(--muted); }
.an-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 16px; }
.an-results { background: #fff; color: #12141F; border-radius: 6px; padding: 30px 36px; box-shadow: var(--shadow); font-family: "Times New Roman", Georgia, serif; font-size: 15.5px; line-height: 1.65; }
.an-results .sv-note { font-family: var(--f-ui); }
.an-text { position: relative; margin: 14px 0 6px; }
.an-text p { margin: 0 0 10px; text-align: justify; }
.an-tacts { display: flex; gap: 12px; font-family: var(--f-ui); font-size: 12.5px; }
.an-ask { display: flex; gap: 8px; margin-top: 6px; font-family: var(--f-ui); } .an-ask input { flex: 1; min-width: 0; }
.an-edit { width: 100%; font: 15px/1.6 "Times New Roman", Georgia, serif; }
.an-table { margin: 18px 0 22px; }
.an-table figcaption { margin-bottom: 6px; }
.an-tw { overflow-x: auto; }
.an-table table { border-collapse: collapse; width: 100%; font-size: 13.5px; border-top: 1.5px solid #222; border-bottom: 1.5px solid #222; }
.an-table th { text-align: left; padding: 5px 8px; border-bottom: 1px solid #222; font-weight: bold; vertical-align: bottom; }
.an-table td { padding: 4px 8px; }
.an-table td:not(:first-child), .an-table th:not(:first-child) { text-align: center; }
.an-table tr.an-sec td:first-child { font-weight: bold; }
.an-table td.ind { padding-left: 24px; }
.an-foot { font-size: 12.5px; font-style: italic; margin: 6px 0 0; }
.an-notes { font: 12.5px var(--f-ui); color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 6px 10px 6px 26px; margin: 8px 0 0; }
.an-fig { margin: 20px auto; text-align: center; }
.an-fig svg { max-width: 100%; height: auto; border: 1px solid #eee; }
.an-fig figcaption { margin-top: 6px; }
.an-err { font: 13.5px var(--f-ui); color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: 8px; margin: 12px 0; }
.an-mh { font-size: 16px; margin: 28px 0 6px; }
.an-chat { position: sticky; top: calc(var(--hd-h) + 70px); border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface); display: grid; gap: 10px; }
.an-chat h3 { margin: 0; font-size: 16px; }
.an-chat textarea { width: 100%; box-sizing: border-box; }
.an-chatlog { max-height: 300px; overflow-y: auto; display: grid; gap: 6px; }
.an-msg { padding: 7px 10px; border-radius: 10px; font-size: 13.5px; }
.an-msg.me { background: var(--accent-soft); justify-self: end; }
.an-msg.ai { background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 980px) { .an-grid { grid-template-columns: minmax(0, 1fr); } .an-chat { position: static; } .an-results { padding: 20px 16px; } .an-plan li { grid-template-columns: 64px minmax(0, 1fr); } .an-type, .an-acts { grid-column: 2; } .an-bar { position: static; } }
.cr-t { margin: 16px 0; } .cr-t h3 { font-size: 15.5px; margin: 0 0 6px; }
.cr-cta { margin-top: 20px; padding: 16px; border-radius: 10px; background: var(--accent-soft); } .cr-cta p { margin: 0 0 10px; }
