:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8faff;
  --ink: #17233a;
  --muted: #75809a;
  --line: #e8ecf4;
  --blue: #3478e5;
  --blue-deep: #164b9c;
  --sky: #7ccff4;
  --focus: #ffb648;
  --shadow: 0 8px 24px rgba(33, 61, 111, .075);
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 99; top: -4rem; left: 1rem; padding: .6rem .9rem; background: #111c33; color: #fff; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(229, 234, 243, .9); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.header-inner { width: min(1220px, calc(100% - 36px)); min-height: 66px; margin: auto; display: flex; gap: 18px; align-items: center; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 9px; font-weight: 780; font-size: 18px; letter-spacing: -.03em; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: linear-gradient(145deg, #438cee, #2350aa); box-shadow: 0 5px 12px rgba(52,120,229,.24); font-size: 16px; }
.category-nav { display: flex; align-items: center; gap: 3px; margin-left: auto; overflow: auto hidden; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a { white-space: nowrap; padding: 7px 9px; border-radius: 8px; color: #59647b; font-size: 13px; }
.category-nav a:hover, .category-nav a:focus-visible { color: var(--blue); background: #eef5ff; outline: 0; }
.nav-toggle { display: none; margin-left: auto; padding: 8px 11px; border: 0; border-radius: 8px; background: transparent; color: #4d586f; font-size: 21px; }

.hero { position: relative; overflow: hidden; width: min(1220px, calc(100% - 36px)); min-height: 273px; margin: 24px auto 0; border-radius: 20px; background: linear-gradient(120deg, #071d43 0%, #0b3b77 52%, #1c6dac 100%); box-shadow: 0 16px 36px rgba(18, 56, 109, .18); color: #fff; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .68; background-image: radial-gradient(circle at 82% 15%, rgba(182,229,255,.5) 0 1px, transparent 2px), radial-gradient(circle at 64% 44%, rgba(255,255,255,.33) 0 1px, transparent 2px), linear-gradient(135deg, rgba(0,0,0,.2), transparent 40%); background-size: 80px 80px, 115px 115px, auto; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: auto -6% -43% 25%; height: 180px; border-radius: 50%; background: radial-gradient(ellipse, rgba(103,206,255,.82) 0%, rgba(43,140,227,.24) 48%, transparent 70%); filter: blur(2px); }
.hero-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); }
.hero-orb-left { width: 245px; height: 245px; left: -84px; bottom: -126px; background: rgba(71, 189, 250, .25); }
.hero-orb-right { width: 350px; height: 350px; right: -116px; top: -180px; background: rgba(120, 216, 255, .14); }
.hero-content { display: grid; align-content: center; justify-items: center; min-height: 273px; padding: 36px 24px; text-align: center; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: #a9dfff; }
.hero h1 { max-width: 800px; margin: 0 0 15px; font-size: clamp(23px, 4vw, 35px); line-height: 1.2; letter-spacing: -.04em; }
.hero-clock { display: grid; gap: 1px; min-width: 240px; text-shadow: 0 2px 6px rgba(0,0,0,.2); }
.hero-clock time { font-size: clamp(36px, 6vw, 53px); font-weight: 800; letter-spacing: .035em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-clock span { font-size: 14px; font-weight: 600; }
.hero-stat { margin: 18px 0 0; color: #d1ecff; font-size: 13px; }
.hero-stat strong { color: #fff; }

.search-panel { width: min(800px, calc(100% - 36px)); margin: -18px auto 0; position: relative; z-index: 2; padding: 10px; border: 1px solid #edf1f8; border-radius: 15px; background: rgba(255,255,255,.98); box-shadow: 0 10px 30px rgba(20, 50, 94, .12); }
.search-form { display: flex; min-height: 50px; }
.search-form input { min-width: 0; flex: 1; border: 0; padding: 0 15px; outline: none; color: var(--ink); background: transparent; }
.search-form input::placeholder { color: #a4adbd; }
.engine-wrap { display: flex; flex: 0 0 auto; align-items: stretch; border-left: 1px solid var(--line); }
.engine-wrap select { max-width: 128px; padding: 0 8px; border: 0; outline: 0; background: #fff; color: #49546a; }
.engine-wrap button { min-width: 76px; border: 0; border-radius: 10px; padding: 0 12px; background: linear-gradient(135deg, #4289ee, #2a64cb); color: #fff; font-weight: 700; }
.engine-wrap button:hover { filter: brightness(1.05); }
.search-help { margin: 7px 6px 1px; color: var(--muted); font-size: 12px; }
.quote { width: min(900px, calc(100% - 36px)); margin: 18px auto 12px; text-align: center; color: #a0a8b7; font-family: KaiTi, STKaiti, serif; font-size: 15px; }
.notice { display: flex; gap: 8px; width: min(1180px, calc(100% - 36px)); margin: 0 auto 24px; padding: 11px 13px; border: 1px solid #dbeaff; border-radius: 10px; color: #4f6e9b; background: #edf6ff; font-size: 12px; }

.directory { width: min(1180px, calc(100% - 36px)); margin: auto; }
.directory-section { margin: 0 0 28px; scroll-margin-top: 85px; }
.section-heading { display: flex; align-items: center; gap: 9px; margin: 0 0 11px; padding: 0 4px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.section-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #e9f4ff; font-size: 18px; }
.section-count { min-width: 24px; padding: 1px 8px; border-radius: 99px; color: #6f7a90; background: #e9edf4; font-size: 12px; text-align: center; }
.resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.resource-card { display: flex; min-width: 0; min-height: 67px; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid transparent; border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 6px rgba(44, 61, 91, .035); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.resource-card:hover, .resource-card:focus-visible { transform: translateY(-2px); border-color: #b7d4ff; box-shadow: var(--shadow); outline: none; }
.resource-card.is-tool { border-color: #d4e6ff; background: linear-gradient(150deg, #fff, #f5faff); }
.resource-icon { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--blue); background: #eaf3ff; font-weight: 700; }
.is-tool .resource-icon { color: #7057ca; background: #eeeaff; }
.resource-copy { min-width: 0; display: grid; gap: 2px; }
.resource-copy strong { overflow: hidden; color: #3a465c; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.resource-copy small { overflow: hidden; color: #8e99ae; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.resource-arrow { margin-left: auto; color: #aab4c5; font-size: 23px; line-height: 1; }
.resource-card[hidden], .directory-section[hidden] { display: none !important; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; width: min(1180px, calc(100% - 36px)); margin: 18px auto 0; padding: 22px 0 28px; border-top: 1px solid var(--line); color: #8892a6; font-size: 12px; }
.site-footer a { color: #5677ae; font-weight: 600; }
.click-spark { position: fixed; z-index: 100; pointer-events: none; color: #4593f2; font-weight: 800; animation: spark-float .75s ease-out forwards; }
@keyframes spark-float { from { opacity: 1; transform: translate(-50%, -50%) scale(.75); } to { opacity: 0; transform: translate(-50%, -190%) scale(1.25); } }

/* Tool pages */
.tool-header { position: relative; }
.back-link { margin-left: auto; color: #4f6a99; font-size: 13px; font-weight: 650; }
.tool-page { width: min(960px, calc(100% - 36px)); margin: 44px auto 0; }
.tool-intro { padding: 18px 2px 23px; }
.tool-intro h1 { margin: 0 0 7px; font-size: clamp(26px, 5vw, 37px); letter-spacing: -.04em; }
.tool-intro > p:last-child { max-width: 760px; margin: 0; color: #73809a; }
.tool-shell { min-height: 260px; padding: clamp(18px, 4vw, 32px); border: 1px solid #e2e9f4; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.tool-safety-note { margin: 15px 0 30px; padding: 12px 14px; border-left: 4px solid #8bb8f5; border-radius: 8px; background: #eaf4ff; color: #526a91; font-size: 13px; }
.tool-form { display: grid; gap: 17px; }
.form-row { display: grid; gap: 7px; }
.form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-row label, .field-label { color: #425069; font-size: 13px; font-weight: 700; }
.tool-input, .tool-textarea, .tool-select { width: 100%; padding: 11px 12px; border: 1px solid #d8e1ee; border-radius: 9px; outline: 0; color: #253149; background: #fff; transition: border-color .16s, box-shadow .16s; }
.tool-textarea { min-height: 145px; resize: vertical; line-height: 1.58; }
.tool-input:focus, .tool-textarea:focus, .tool-select:focus { border-color: #639cf1; box-shadow: 0 0 0 3px rgba(84, 145, 239, .15); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button { border: 0; border-radius: 9px; padding: 10px 14px; background: #edf2fa; color: #43516c; font-weight: 700; }
.button:hover { filter: brightness(.97); }
.button.primary { color: #fff; background: linear-gradient(135deg, #438aea, #2962c4); }
.button.danger { color: #b44747; background: #fff0f0; }
.checkboxes { display: flex; flex-wrap: wrap; gap: 13px; color: #637088; font-size: 13px; }
.result-card { min-height: 70px; padding: 14px; border: 1px dashed #cdd9ea; border-radius: 10px; color: #43506a; background: #f9fbff; white-space: pre-wrap; word-break: break-word; }
.result-card.empty { color: #9ca6b6; }
.result-table { width: 100%; border-collapse: collapse; overflow: hidden; border: 1px solid #e3eaf5; border-radius: 9px; font-size: 13px; }
.result-table th, .result-table td { padding: 9px 10px; border-bottom: 1px solid #e7edf5; text-align: left; }
.result-table th { color: #53617b; background: #f3f7fc; }
.result-table tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 99px; color: #33714b; background: #e3f7e9; font-size: 11px; font-weight: 700; }
.pill.no { color: #a44b53; background: #ffebed; }
.tool-warning { padding: 12px; border-radius: 8px; color: #9c641f; background: #fff3d9; }
.tool-help { margin: -7px 0 0; color: #7e8a9e; font-size: 12px; }
.tool-link-list { display: grid; gap: 8px; }
.tool-link-list a { padding: 10px 11px; border: 1px solid #dce8fb; border-radius: 9px; color: #3568ad; background: #f5f9ff; }

@media (max-width: 1040px) {
  .resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-nav a { padding-inline: 7px; }
}
@media (max-width: 760px) {
  .header-inner { min-height: 60px; width: min(100% - 28px, 620px); }
  .brand { font-size: 17px; }
  .category-nav { display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0; max-height: 70vh; padding: 10px 14px 14px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 10px 20px rgba(36,52,81,.1); flex-wrap: wrap; }
  .category-nav.is-open { display: flex; }
  .nav-toggle { display: block; }
  .hero { width: min(100% - 28px, 620px); min-height: 244px; margin-top: 14px; border-radius: 13px; }
  .hero-content { min-height: 244px; padding: 28px 16px; }
  .hero h1 { font-size: 23px; }
  .hero-clock time { font-size: 42px; }
  .search-panel { width: min(100% - 28px, 620px); margin-top: -10px; border-radius: 12px; }
  .search-form { display: grid; gap: 8px; }
  .search-form input { min-height: 43px; padding-inline: 10px; }
  .engine-wrap { min-height: 42px; border: 0; border-top: 1px solid var(--line); }
  .engine-wrap select { flex: 1; max-width: none; }
  .quote, .notice, .directory, .site-footer, .tool-page { width: min(100% - 28px, 620px); }
  .notice { margin-bottom: 20px; }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .resource-card { min-height: 59px; padding: 9px; gap: 8px; border-radius: 10px; }
  .resource-icon { width: 25px; height: 25px; border-radius: 7px; font-size: 12px; }
  .resource-copy strong { font-size: 13px; }
  .resource-copy small { display: none; }
  .resource-arrow { display: none; }
  .directory-section { margin-bottom: 22px; }
  .section-heading h2 { font-size: 16px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .tool-page { margin-top: 22px; }
  .tool-shell { padding: 17px; border-radius: 13px; }
  .form-row.two { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  .resource-grid { grid-template-columns: 1fr; }
}
