:root {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #142b3a;
  background: #f5f6f3;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --muted: #61727a;
  --line: #dce3df;
  --accent: #126e66;
  --accent-dark: #0b5751;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button, input, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid #428b83; }
button { touch-action: manipulation; }

.page-shell {
  max-width: 1360px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 600; }
.brand-mark { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #263f4b; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.brand-mark > span { position: absolute; width: 5px; height: 5px; bottom: -3px; right: -3px; background: var(--accent); }
.brand-divider { margin: 0 7px; color: #9babae; font-weight: 400; }
.header-tag { color: var(--muted); font-size: 12px; letter-spacing: .06em; white-space: nowrap; }

.main-layout { display: grid; grid-template-columns: 1fr 480px; align-items: start; gap: 76px; width: 100%; max-width: 1052px; margin: 0 auto; padding: 74px 0 82px; flex: 1; }
.intro { position: relative; padding-top: 27px; }
.intro::after { content: ""; position: absolute; z-index: -1; inset: 78px 0 76px -22px; background-image: linear-gradient(#dae2de 1px, transparent 1px), linear-gradient(90deg, #dae2de 1px, transparent 1px); background-size: 31px 31px; opacity: .27; mask-image: linear-gradient(110deg, #000, transparent 78%); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 26px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.eyebrow > span { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); }
h1 { margin: 0; font-size: clamp(38px, 4.25vw, 60px); line-height: 1.28; letter-spacing: -.05em; font-weight: 650; }
.title-dot { color: var(--accent); }
.intro-copy { margin: 25px 0 0; color: #546a73; font-size: 19px; line-height: 1.8; letter-spacing: .01em; }
.connection-note { display: flex; align-items: center; gap: 15px; margin-top: 44px; }
.note-icon { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #c8d6d0; border-radius: 50%; color: var(--accent); font-size: 24px; }
.connection-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.connection-note strong { color: #29434b; font-weight: 600; }
.intro-caption { margin: 29px 0 0; color: var(--muted); font-size: 12px; line-height: 1.9; }

.access-card { background: #fff; border: 1px solid #e1e7e2; border-radius: 20px; padding: 34px 36px 28px; box-shadow: 0 16px 42px -28px #23473a3d; }
.section-index { color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.card-heading h2 { font-size: 23px; font-weight: 600; letter-spacing: -.02em; margin: 15px 0 9px; }
.card-heading > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
form { margin-top: 29px; }
.field + .field { margin-top: 20px; }
label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
input { display: block; width: 100%; height: 50px; padding: 0 14px; border: 1px solid #d6dfda; border-radius: 7px; background: #fafbf9; color: #16333e; font-size: 15px; transition: border-color .15s, background .15s; }
input:hover { border-color: #a7bbb1; }
input:focus { border-color: var(--accent); background: #fff; }
input::placeholder { color: #809087; font-size: 13px; }
input:disabled { opacity: .65; }
.privacy-note { margin: 15px 0 23px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.privacy-note > span { color: var(--accent); margin-right: 3px; font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 17px; border-radius: 7px; border: 1px solid transparent; font-size: 14px; font-weight: 600; transition: background .15s; }
.button-primary { width: 100%; color: #fff; background: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }
.button-primary:disabled { opacity: .75; }
.button-arrow { margin-left: auto; font-size: 21px; font-weight: 400; }
.button-primary > #submit-label { margin-right: auto; }
.spinner { width: 15px; height: 15px; border: 2px solid #ffffff50; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feedback { margin: 0; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.feedback:not(:empty) { margin-top: 16px; padding: 11px 13px; color: #245950; background: #eef6f1; border-radius: 6px; }
.feedback[data-state="error"] { color: #8c3b30; background: #fcf0ec; }
.noscript-message { color: #8c3b30; font-size: 13px; }

.result { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 23px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--accent); }
.success-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.text-button { min-height: 32px; padding: 4px 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #8cb9ac; }
.text-button:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
.result-label { margin: 20px 0 6px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.ip-address { margin: 0; color: #193843; font-family: "Cascadia Code", Consolas, monospace; font-size: clamp(22px, 3.1vw, 38px); font-weight: 500; line-height: 1.45; letter-spacing: -.06em; overflow-wrap: anywhere; }
.button-secondary { background: #edf5f1; color: var(--accent); border-color: #dcebe3; font-size: 12px; min-height: 38px; }
.button-secondary:hover { background: #dfefe6; }
.copy-ip { margin-top: 13px; }
.ssh-block { margin-top: 23px; padding: 10px 14px 16px; border: 1px solid #e2e8e2; border-radius: 7px; background: #f8faf7; }
.ssh-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.ssh-block code { display: block; margin-top: 6px; color: #244b50; font: 13px/1.7 "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.timestamps { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
.timestamps > div { display: flex; gap: 12px; justify-content: space-between; }
.timestamps dt { flex-shrink: 0; }
.timestamps dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.update-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.first-login-note { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.first-login-label { color: #425d66; font-size: 11px; font-weight: 600; }
.first-login-note p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.85; }
.history-card { grid-column: 1 / -1; min-width: 0; padding: 32px 36px; background: #fff; border: 1px solid #e1e7e2; border-radius: 20px; box-shadow: 0 16px 42px -28px #23473a26; }
.history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.history-heading h2 { margin: 13px 0 8px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.history-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.history-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.admin-tag { display: inline-block; padding: 5px 9px; border: 1px solid #dae6df; border-radius: 5px; color: var(--accent); background: #f4f8f5; font-size: 11px; white-space: nowrap; }
.history-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 28px 0 22px; padding: 23px 0; border-block: 1px solid var(--line); }
.history-stats > div { padding: 0 25px; border-left: 1px solid var(--line); }
.history-stats > div:first-child { border-left: 0; padding-left: 0; }
.history-stats dt { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.history-stats dd { margin: 0; color: #163f47; font-size: 33px; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.history-range { display: flex; flex-wrap: wrap; gap: 6px 32px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.history-range > div { display: flex; flex-wrap: wrap; column-gap: 12px; }
.history-range dt { color: #425d66; }
.history-range dd { margin: 0; font-variant-numeric: tabular-nums; }
.history-explanation { margin: 11px 0 23px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.history-list { display: grid; gap: 11px; list-style: none; margin: 0; padding: 0; }
.history-entry { display: grid; grid-template-columns: minmax(150px, .78fr) minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 22px; min-width: 0; padding: 18px 19px; border: 1px solid #e1e7e2; border-radius: 9px; background: #fbfcfa; }
.history-entry[data-event="changed"] { border-color: #bcd4c8; background: #f5faf6; }
.history-record, .history-address, .history-meta { min-width: 0; }
.event-tag { display: inline-block; padding: 4px 8px; border-radius: 4px; color: #53666f; background: #eaf0ed; font-size: 10px; font-weight: 600; line-height: 1.5; }
.history-entry[data-event="changed"] .event-tag { background: #dfeee5; color: var(--accent-dark); }
.history-entry[data-event="initial"] .event-tag { background: #e6eef3; color: #31546b; }
.history-record-time { margin: 9px 0 0; color: #324e58; font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.history-record-caption { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.history-route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; color: #607d78; }
.history-route code { color: #244750; font: 14px/1.7 "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; }
.history-route code:last-child { color: #16483f; font-weight: 600; }
.history-route .route-label { color: var(--muted); font-size: 11px; }
.history-address-note { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.history-meta { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.history-meta > div + div { margin-top: 7px; }
.history-meta dt { color: #61766f; }
.history-meta dd { margin: 1px 0 0; color: #304f57; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.history-empty { margin: 20px 0; padding: 25px 15px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 8px; }
.history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 23px; }
.history-pagination p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; text-align: center; font-variant-numeric: tabular-nums; }
.history-pagination .button { min-height: 38px; white-space: nowrap; }
.history-pagination .button:disabled { background: #f6f8f5; border-color: #e8ece7; color: #73877e; opacity: .6; cursor: default; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 24px 0 28px; color: var(--muted); font-size: 10px; line-height: 1.8; }

@media (max-width: 1050px) {
  .page-shell { padding: 0 40px; }
  .main-layout { gap: 44px; grid-template-columns: 1fr 440px; padding: 56px 0 64px; }
  .access-card { padding: 30px; }
  .history-card { padding: 28px; }
  .history-entry { gap: 15px; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.1fr) minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .page-shell { max-width: 590px; padding: 0 24px; }
  .site-header { min-height: 82px; gap: 12px; }
  .brand { font-size: 12px; gap: 10px; }
  .brand-divider { margin: 0 2px; }
  .header-tag { font-size: 10px; letter-spacing: 0; }
  .main-layout { grid-template-columns: 1fr; gap: 32px; padding: 37px 0 40px; }
  .intro { padding: 0; }
  .eyebrow { margin-bottom: 17px; font-size: 9px; }
  h1 { font-size: 39px; line-height: 1.22; }
  h1 > br { display: none; }
  .intro-copy { margin-top: 14px; font-size: 15px; line-height: 1.85; }
  .desktop-break { display: none; }
  .connection-note { margin-top: 19px; gap: 10px; }
  .note-icon { width: 28px; height: 28px; font-size: 17px; }
  .connection-note p { font-size: 11px; }
  .connection-note p > br { display: none; }
  .connection-note strong { margin-left: 4px; }
  .intro-caption { display: none; }
  .access-card { padding: 27px; border-radius: 15px; }
  .card-heading h2 { font-size: 22px; }
  .ip-address { font-size: 36px; }
  .history-card { padding: 27px; border-radius: 15px; }
  .history-heading { flex-direction: column; gap: 15px; }
  .history-heading h2 { font-size: 22px; }
  .history-actions { width: 100%; justify-content: space-between; }
  .history-stats { margin-top: 22px; padding: 20px 0; }
  .history-stats > div { padding: 0 14px; }
  .history-stats dt { font-size: 10px; }
  .history-stats dd { font-size: 27px; }
  .history-entry { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .history-record { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; }
  .history-record .event-tag { justify-self: start; }
  .history-record-time { margin: 0; text-align: right; font-size: 11px; }
  .history-record-caption { grid-column: 2; text-align: right; font-size: 9px; }
  .history-route code { font-size: 14px; }
  .history-meta { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 11px; }
  .history-meta > div + div { margin-top: 0; }
  .history-pagination { gap: 8px; }
  .history-pagination .button { min-height: 40px; padding: 8px 10px; font-size: 11px; }
  .history-pagination p { font-size: 10px; }
  .site-footer { align-items: flex-start; font-size: 9px; }
  .site-footer > span:last-child { max-width: 126px; text-align: right; }
}

@media (max-width: 390px) {
  .page-shell { padding: 0 18px; }
  .header-tag { display: none; }
  h1 { font-size: 35px; }
  .access-card { padding: 24px 20px; }
  .history-card { padding: 24px 18px; }
  .history-stats > div { padding: 0 10px; }
  .history-stats dt { font-size: 9px; }
  .history-record { grid-template-columns: 1fr; gap: 6px; }
  .history-record-time, .history-record-caption { text-align: left; }
  .history-record-caption { grid-column: 1; margin-top: -5px; }
  .history-meta { grid-template-columns: 1fr; }
  .history-pagination { flex-wrap: wrap; }
  .history-pagination p { order: -1; flex-basis: 100%; }
  .ip-address { font-size: 29px; }
  .timestamps > div { flex-direction: column; gap: 0; margin-top: 6px; }
  .timestamps dd { text-align: left; }
}

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