
:root{
  --bg:#ffffff;
  --fg:#1f2328;
  --muted:#6b7280;
  --border:#e6e8eb;
  --border-2:#eef0f3;
  --surface:#ffffff;
  --surface-2:#f7f7f8;
  --surface-3:#fbfbfc;
  --primary:#2563eb;
  --code-bg:#f6f8fa;
  --code-fg:#111827;
  --shadow:0 1px 0 rgba(16,24,40,.04);
  --shadow-2:0 18px 50px rgba(16,24,40,.10);
  --radius:12px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--fg)}
body{
  font:16px/1.72 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,
       "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",
       "Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei";
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

main{max-width:1040px;margin:44px auto 0;padding:0 18px 24px}
article{max-width:78ch;margin:0 auto}

h1,h2,h3,h4{letter-spacing:.1px}
h1{font-size:34px;line-height:1.2;margin:0 0 10px}
h2{font-size:24px;line-height:1.35;margin:30px 0 10px}
h3{font-size:20px;line-height:1.45;margin:22px 0 8px}
p{margin:12px 0}

a{color:var(--primary);text-decoration:none;text-underline-offset:3px}
a:hover{text-decoration:underline}
hr{border:none;border-top:1px solid var(--border-2);margin:28px 0}

/* Header: title + standard barcode */
.header-flex{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.header-flex, .downloads, .footer .footer-inner{max-width:78ch;margin:0 auto}
.header-flex h1{margin:0}
.barcode{
  display:block;height:64px;max-width:640px;width:auto;object-fit:contain;flex:0 0 auto;margin-top:6px
}

/* Buttons */
.btn{display:inline-block;padding:10px 14px;border-radius:10px;background:#2563eb;color:#fff;
     text-decoration:none;font-weight:600;border:1px solid #1e4fd9;transition:transform .12s,filter .15s,box-shadow .15s;white-space:nowrap;box-shadow:0 10px 26px rgba(37,99,235,.16)}
.btn:hover{filter:brightness(1.03);text-decoration:none;transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn-xs{padding:6px 10px;font-size:13px;border-radius:9px;box-shadow:none}
.btn-outline{background:#fff;color:#2563eb;border-color:#c7d2fe;box-shadow:none}
.btn-outline:hover{background:#f8fafc;border-color:#a5b4fc}
.downloads{margin:12px auto 0; padding:0 2px; display:flex; gap:10px; flex-wrap:wrap}

/* Attachment note (filename under caption button) */
.file-note{color:var(--muted);font-size:13px;margin:6px 0 0 0}

/* Typography */
article > * + *{margin-top:12px}
article strong{font-weight:700}
article em{font-style:italic}
article code:not(pre code){
  background:var(--code-bg);color:var(--code-fg);
  padding:0 4px;border-radius:4px;border:1px solid #e7e9eb
}

/* Quote (Notion-like) */
blockquote.n-quote{
  margin:14px 0;
  padding:8px 14px;
  border-left:3px solid #d7dce2;
  background:transparent;
  border-radius:10px;
  color:#374151;
}
blockquote.n-quote > *{margin:10px 0}

/* Lists */
ul,ol{margin:10px 0 10px 1.25em}
li{margin:6px 0}
li > ul, li > ol{margin-top:6px}

/* Images & captions */
article img{max-width:100%;height:auto;border-radius:8px}
figure{margin:14px 0}
figcaption{color:var(--muted);font-size:13px;margin-top:6px}

/* Tables (Notion-like) */
.table-wrap{margin:16px 0}
.table-shell{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.table-scroll table{border-collapse:separate;border-spacing:0;width:100%;min-width:640px}
article th,article td{
  border-right:1px solid var(--border-2);
  border-bottom:1px solid var(--border-2);
  padding:9px 12px;
  text-align:left;
  vertical-align:top;
  word-break:break-word;
  white-space:normal;
}
article tr:last-child td, article tr:last-child th{border-bottom:none}
article th:last-child, article td:last-child{border-right:none}
article thead th{background:var(--surface-2);font-weight:600}
article tbody tr:hover td, article tbody tr:hover th{background:var(--surface-3)}

/* Callout / Toggle / Columns */
.n-callout{display:flex;gap:10px;align-items:flex-start;border-radius:10px;padding:12px 14px;margin:14px 0;background:#f8fafc;border:1px solid #e6e8eb}
.n-callout .icon{font-size:18px;line-height:1.2}
details.n-toggle{border:1px dashed var(--border);border-radius:8px;padding:10px 12px;margin:12px 0;background:#fff}
details.n-toggle > summary{cursor:pointer;font-weight:600;list-style:none}
details.n-toggle > summary::-webkit-details-marker{display:none}
.n-columns{display:grid;gap:16px}
@media(min-width:860px){ .n-columns.cols-2{grid-template-columns:1fr 1fr} .n-columns.cols-3{grid-template-columns:1fr 1fr 1fr} }

/* Code blocks: light Notion-like card */
pre.n-code-notion{
  background:var(--code-bg);color:var(--code-fg);border:1px solid #e5e7eb;border-radius:10px;
  padding:14px 16px;overflow:auto;white-space:pre;word-break:normal;tab-size:2;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:14px;line-height:1.65;
}
pre.n-code-notion code{background:transparent;padding:0;white-space:pre}

/* Math (MathJax) */
.mjx-container{overflow-x:auto}
.n-equation-card{
  margin:14px 0;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-2);
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.n-equation-inner{
  display:inline-block;
  min-width:max-content;
}
.n-equation-card .mjx-container{margin:0}

/* Footer with icons */
.footer{margin:48px 0 24px 0;font-size:13px;color:var(--muted)}
.footer-inner{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.footer-inner .spacer{flex:1 1 auto}
.footer a.icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border-radius:8px;border:1px solid var(--border);
  color:var(--fg);text-decoration:none
}
.footer a.icon:hover{background:var(--surface-2)}

/* Mentions */
.n-mention{display:inline-flex;align-items:center;gap:6px;padding:0 6px;border-radius:999px;border:1px solid var(--border-2);background:var(--surface-3);color:#374151;font-size:13px;line-height:1.6}
.n-mention .dot{width:6px;height:6px;border-radius:999px;background:#9ca3af}

/* Landing */
.landing{
  max-width:980px;
  margin:0 auto;
  padding:0 18px;
  min-height:100vh;
  display:flex;
  align-items:center;
}
.landing::before{
  content:"";
  position:fixed;
  inset:-20vh -20vw auto -20vw;
  height:70vh;
  background:
    radial-gradient(closest-side at 20% 45%, rgba(37,99,235,.16), rgba(37,99,235,0)),
    radial-gradient(closest-side at 70% 30%, rgba(17,24,39,.10), rgba(17,24,39,0)),
    radial-gradient(closest-side at 55% 70%, rgba(99,102,241,.10), rgba(99,102,241,0));
  pointer-events:none;
  z-index:0;
}
.landing-card{
  position:relative;
  z-index:1;
  width:100%;
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(140%) blur(10px);
  box-shadow:var(--shadow-2);
  padding:34px 30px;
}
.landing-top{
  display:flex;
  gap:18px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}
.brand{
  display:flex;
  gap:14px;
  align-items:center;
}
.brand-mark{
  width:54px;height:54px;border-radius:16px;
  border:1px solid #dbe3ff;
  background:linear-gradient(180deg,#ffffff, #f6f8ff);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 28px rgba(37,99,235,.10);
}
.brand h1{margin:0;font-size:24px;line-height:1.2}
.brand p{margin:8px 0 0 0;color:var(--muted);max-width:62ch}
.landing-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.landing-meta{margin-top:18px;color:var(--muted);font-size:13px}
.landing-links{margin-top:10px;display:flex;gap:12px;flex-wrap:wrap}

@media print{
  a{color:#000;text-decoration:none}
  .barcode{height:96px}
  pre.n-code-notion{page-break-inside:avoid}
  .landing::before{display:none}
  .landing{min-height:auto}
}
