/* mTM-align3 site shell — mirrors index.mtm3.html visual baseline.
   Loaded after bootstrap.css, before each page's own <style>. */

:root {
    --ink: #17324d;
    --muted: #617387;
    --line: #dce5ed;
    --brand: #245c83;
    --green: #237a61;
    --bg: #f4f7fa;
    --surface: #ffffff;
    --shadow: 0 6px 28px #17324d05;
    --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a { color: #22648d; }
a:hover, a:focus { color: #164563; text-decoration: none; }

.container {
    width: calc(100% - 64px);
    max-width: 1180px;
}

/* ---------- navigation ---------- */
nav { background: transparent; }

/* !important: legacy pages declare .navbar{background-color:#315880} after this file */
.navbar {
    background: #173b57 !important;
    border: 0 !important;
    border-radius: 0;
    min-height: 54px;
    margin: 0;
}
.navbar .nav { display: flex; flex-wrap: wrap; float: none; }
.navbar .nav > li { float: none; }
.navbar .nav > li > a { font-size: 13px; padding: 16px 13px; }
/* 导航首项的文字/图标与页面内容左边界对齐（去掉 flex gap 与首项内边距） */
.navbar .nav > li:first-child > a { padding-left: 0; }
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar .nav > li > a:hover { background: #28516f !important; color: #fff !important; }
.navbar .dropdown-menu {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 8px 24px #17324d14;
}
.navbar .dropdown-menu > li > a { padding: 8px 12px; font-size: 12px; color: var(--ink); }
.navbar .dropdown-menu > li > a:hover { background: #f0f5f9; color: var(--brand); }

/* ---------- page header ---------- */
.page-head { margin: 26px 0 18px; }
.page-kicker {
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.page-title {
    margin: 0;
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -.5px;
    line-height: 1.25;
}
.page-title span { color: var(--brand); }
.page-sub { margin: 8px 0 0; color: var(--muted); font-size: 13px; max-width: 760px; }

/* ---------- action toolbar ---------- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    list-style: none;
    margin: 0 0 16px;
    padding-left: 0;
}
.toolbar a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 14px;
    font-size: 12px;
    color: var(--brand);
    text-decoration: none;
}
.toolbar a:hover { border-color: #9ec0d6; background: #fbfdff; color: #164563; text-decoration: none; }

/* legacy blue banners become section headings, no markup change needed.
   two shapes exist: <h3><div style="...315880...">Title</div></h3>
                    and <h3 style="...315880...">Title</h3> */
h3 > div[style*="315880"],
h3[style*="315880"] {
    background: transparent !important;
    color: var(--ink) !important;
    border-left: 3px solid var(--green);
    border-bottom: 1px solid var(--line);
    text-align: left !important;
    padding: 8px 0 9px 12px !important;
    margin: 24px 0 14px !important;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .2px;
}
h3 > div[style*="315880"]:first-child { margin-top: 0 !important; }
h3[style*="315880"] { display: block; }

/* ---------- surfaces ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
}

/* legacy bare tables (download page) */
.container table:not(.table) {
    width: 100%;
    margin-left: 0 !important;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.container table:not(.table) caption {
    font-size: 13px !important;
    font-weight: 650;
    color: var(--ink) !important;
    text-align: left;
    padding: 0 0 10px;
}
.container table:not(.table) th,
.container table:not(.table) td {
    padding: 9px 12px;
    border-bottom: 1px solid #eef3f7;
    font-size: 12px;
    vertical-align: top;
    text-align: left !important;
}
.container table:not(.table) th { background: #f7fafc; color: #4a6577; font-weight: 650; font-size: 11px; }
.container table:not(.table) tr:hover td { background: #f7fbfd; }
.container table:not(.table) tr:last-child td { border-bottom: 0; }

.section-title {
    display: block;
    border-left: 3px solid var(--green);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 9px 12px;
    margin: 26px 0 14px;
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
}

.container > li { list-style: none; padding-left: 0; }

/* ---------- tables ---------- */
.table > thead > tr > th {
    background: #f7fafc;
    border-bottom: 1px solid var(--line) !important;
    font-size: 11px;
    font-weight: 650;
    color: #4a6577;
    vertical-align: middle;
}
.table > tbody > tr > td { border-color: #eef3f7 !important; font-size: 12px; }
.table > tbody > tr:hover > td { background: #f7fbfd !important; }

/* ---------- typography of legacy body copy ---------- */
.container p { font-size: 13px; color: #3d5568; line-height: 1.85; overflow-wrap: anywhere; word-break: break-word; }
/* legacy paragraphs rely on white-space:pre for line breaks and blow past the 1180px shell */
.container p[style*="white-space"] { white-space: pre-wrap !important; }
.container li { font-size: 13px; line-height: 1.85; }
h5 { font-size: 13px; font-weight: 650; color: #4a6577; }
hr { border-top: 1px solid var(--line); }

/* ---------- references ---------- */
.refs {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    color: var(--muted);
    font-size: 12px;
}
.refs h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--ink); }
.refs ul { margin: 0; padding-left: 18px; }
.refs li { margin-bottom: 5px; line-height: 1.65; font-size: 12px; }
.refs a { color: var(--brand); }
#footer hr { display: none; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #85afcb; outline-offset: 3px; }

@media (max-width: 760px) {
    .container { width: calc(100% - 28px); }
    .navbar .nav { margin: 0; }
    .navbar .nav > li > a { padding: 11px 9px; font-size: 11px; }
    .page-title { font-size: 22px; }
    .card { padding: 16px 15px; border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
