/* ============ obedit.obroom.com 的样式 (2026-11-26 B哥: 不照搬 hotkit, 要有自己的样子、简洁、一两屏;
   2026-11-29 B哥: 字小一点、少一点, 简洁、极客, 体现轻巧、秒开、流畅, 把功能列一列) ============
   白纸 + 等宽字 + 细线。颜色只用 logo 里那几个 (墨 #1f2328 / 线 #c3c9d1 / 光标绿 #16a34a)。
   首屏: 左边宣传语, 右边一个画出来的编辑器窗口; 一条状态栏放三个数; 第二屏是全部功能 + 快捷键。 */

:root {
  --paper: #ffffff;
  --ink: #1f2328;
  --ink-2: #57606a;
  --ink-3: #8c959f;
  --line: #e6e9ed;
  --rule: #c3c9d1;
  --green: #16a34a;
  --green-ink: #15803d;
  --tint: #f6f8fa;
  --sel: #d3f5dd;
  --pad: clamp(16px, 4vw, 40px);
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, system-ui, "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "Microsoft YaHei UI", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
img, svg { display: block; }
::selection { background: var(--sel); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--pad); }
/* 桌面 / 手机各自的元素: 手机上下载按钮换成「把链接发到电脑上」 */
.mob { display: none !important; }
@media (max-width: 1023px), (pointer: coarse) {
  .desk { display: none !important; }
  .mob { display: inline-flex !important; }
}

/* ── 页头: 一条细线, 字都小 ── */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 48px; font-size: 13.5px; }
.logo { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.nav { display: flex; gap: 18px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.langs { display: flex; gap: 2px; font-family: var(--mono); font-size: 12.5px; }
.langs button { padding: 3px 7px; border-radius: 5px; color: var(--ink-3); }
.langs button:hover { color: var(--ink); background: var(--tint); }
.langs button[aria-current="true"] { color: var(--ink); background: var(--tint); }

/* ── 首屏: 宣传语、一句话三个数、下载, 下面紧跟截图 ── */
.hero { padding: clamp(40px, 8vh, 80px) 0 clamp(40px, 7vh, 72px); }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
h1 { margin-top: 10px; font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; line-height: 1.18; letter-spacing: -0.025em; }
h1 .words { color: var(--green-ink); white-space: nowrap; }
:lang(zh) h1 { letter-spacing: 0; }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.12em; background: var(--green); animation: blink 1.06s steps(1) infinite; }
h1 .caret { width: 0.08em; height: 0.9em; margin-left: 0.08em; vertical-align: -0.06em; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.lede { max-width: 40em; margin-top: 16px; font-size: 15.5px; color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 18px; font-size: 14px; font-weight: 600; color: #fff; background: var(--ink); border-radius: 6px; transition: background 0.12s; }
.btn:hover { background: #000; }
.btn-link { min-height: 38px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; box-shadow: inset 0 -1px 0 var(--rule); }
.meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.soon { padding: 2px 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); border: 1px dashed var(--rule); border-radius: 999px; }

/* ── 模拟的 ObEdit 窗口: 照 Windows 11 上的样子 (白标题栏、菜单栏、标签、等宽字、状态栏), 颜色是 Windows 的, 不是网站的 ── */
.app { --w-line: #e5e5e5; --w-bg: #f3f3f3; --w-hover: #e9e9e9; --w-blue: #0067c0;
  position: relative; margin-top: clamp(32px, 5vh, 48px); font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, "Microsoft YaHei UI", sans-serif; font-size: 12.5px; line-height: 1.4; color: #1a1a1a; background: #fff; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 24px 48px -28px rgba(31, 35, 40, 0.55); }
.app-title { display: flex; align-items: center; gap: 8px; height: 32px; padding-left: 10px; border-radius: 8px 8px 0 0; }
.app-title span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app-ctl { display: flex; flex: none !important; align-self: stretch; }
.app-ctl i { position: relative; width: 46px; }
.app-ctl i::before, .app-ctl i::after { content: ""; position: absolute; left: 50%; top: 50%; }
.app-ctl .min::before { width: 10px; height: 1px; margin: 0 0 0 -5px; background: #1a1a1a; }
.app-ctl .max::before { width: 9px; height: 9px; margin: -5px 0 0 -5px; border: 1px solid #1a1a1a; border-radius: 2px; }
.app-ctl .x::before, .app-ctl .x::after { width: 13px; height: 1px; margin-left: -6px; background: #1a1a1a; transform: rotate(45deg); }
.app-ctl .x::after { transform: rotate(-45deg); }
.app-bar { display: flex; height: 28px; padding: 0 4px; }
/* 工具栏: 图标是 Windows 的图标字体 (同程序); 按下的有底色, 用不了的变淡。没有这个字体 (Mac / Linux) 就不显示 */
.app-tools { display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 6px; overflow: hidden; border-top: 1px solid var(--w-line); }
.app-tools button { flex: none; width: 30px; height: 28px; font: 16px "Segoe Fluent Icons", "Segoe MDL2 Assets"; color: #1a1a1a; border-radius: 4px; }
.app-tools button:hover { background: var(--w-hover); }
.app-tools .on { background: #e0e0e0; }
.app-tools .off { color: #b8b8b8; }
.app-tsep { flex: none; width: 1px; height: 18px; margin: 0 5px; background: #d6d6d6; }
.no-icons .app-tools { display: none; }
.app-tabs { display: flex; align-items: flex-end; gap: 2px; height: 34px; padding: 0 8px; overflow: hidden; background: var(--w-bg); border-top: 1px solid var(--w-line); border-bottom: 1px solid var(--w-line); }
.app-tabs button, .app-tabs .add { flex: none; padding: 6px 16px; color: #5f5f5f; border-radius: 6px 6px 0 0; }
.app-tabs button:hover { color: #1a1a1a; background: var(--w-hover); }
.app-tabs .on, .app-tabs .on:hover { position: relative; top: 1px; color: #1a1a1a; font-weight: 600; background: #fff; border: 1px solid var(--w-line); border-bottom: 0; box-shadow: inset 0 2px 0 var(--w-blue); }
.app-tabs .add { padding: 6px 10px; }
/* 正文 (左) 和预览 (右), 中间一道分隔线; 正文一行一个 div: 行号 + 文字, 第一行是光标所在行 */
.app-body { display: flex; height: 540px; }
.app-body > * { flex: 1; min-width: 0; overflow: auto; }
.app-body.split > .app-pv { border-left: 4px solid var(--w-bg); box-shadow: -1px 0 0 var(--w-line); }
.app-text { padding: 2px 0; font-family: "Cascadia Mono", Consolas, ui-monospace, "Microsoft YaHei UI", monospace; font-size: 12.5px; line-height: 20px; white-space: pre;
  background: linear-gradient(90deg, #fafafa 44px, var(--w-line) 44px 45px, transparent 45px) local; }
.app-text .l { display: flex; min-height: 20px; }
.app-text .l > span { flex: 1; }
.app-text.wrap .l > span { white-space: pre-wrap; overflow-wrap: anywhere; }
.app-text i { flex: none; width: 44px; margin-right: 8px; padding-right: 8px; font-style: normal; text-align: right; color: #8a8a8a; }
.app-text .cur { background: linear-gradient(90deg, transparent 45px, #fff7d1 45px); }
.app-text .cur i { color: #1a1a1a; }
.app-text .h { color: #0550ae; font-weight: 700; }
.app-text .m { color: #953800; }
.app-text .b { font-weight: 700; }
.app-text .c, .app-text .s { color: #a31515; }
.app-text .k { color: #0451a5; }
.app-text .n { color: #098658; }
.app-text .w { color: #0000ff; }
/* 十六进制视图: 照 engine/win/src/hex.rs 的颜色 (偏移和列号淡灰 #999, 栏间细线 #e4e4e4, 选中蓝 #0078d7) */
.app-hex { padding: 0 0 8px; font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 12.5px; line-height: 20px; white-space: pre; color: #202020; }
.app-hex .r { display: flex; }
.app-hex .o, .app-hex .x, .app-hex .t { flex: none; padding: 0 12px; }
.app-hex .o { width: calc(8ch + 24px); color: #999; border-right: 1px solid #e4e4e4; }
.app-hex .x { border-right: 1px solid #e4e4e4; }
.app-hex .ruler { position: sticky; top: 0; color: #999; background: #fff; border-bottom: 1px solid #e4e4e4; }
.app-hex .ruler span { color: #999; }
.app-hex b { font-weight: 400; color: #fff; background: #0078d7; }
.app-hex .t b { color: #0078d7; background: #cce4f7; }
/* 预览: 照 obedit tools/preview.rs 的 MARKDOWN_CSS / JSON_CSS / BAR_CSS */
.app-pv { position: relative; color: #1f2328; }
.pv-bar { position: absolute; top: 6px; right: 10px; display: flex; gap: 2px; padding: 2px; background: rgba(255, 255, 255, 0.92); border: 1px solid #d1d9e0; border-radius: 6px; }
.pv-bar button { display: flex; align-items: center; justify-content: center; width: 26px; height: 24px; color: #57606a; border-radius: 4px; }
.pv-bar button:hover { color: #1f2328; background: #eaeef2; }
.pv-bar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.markdown-body { padding: 16px 24px; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.6; }
.markdown-body h1, .markdown-body h2 { padding-bottom: 0.3em; border-bottom: 1px solid #d1d9e0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 20px 0 12px; font-weight: 600; line-height: 1.25; }
.markdown-body h1 { margin-top: 0; font-size: 1.9em; }
.markdown-body h2 { font-size: 1.4em; }
.markdown-body p, .markdown-body ul { margin: 0 0 14px; }
.markdown-body ul { padding-left: 2em; list-style: disc; }
.markdown-body code { padding: 0.2em 0.4em; font-family: Consolas, monospace; font-size: 85%; background: #eff1f3; border-radius: 6px; }
.json { padding: 12px 16px; font: 13px/1.5 Consolas, monospace; white-space: nowrap; }
.json .ch { margin-left: 1.4em; padding-left: 0.4em; border-left: 1px solid #ebedf0; }
.json .collapsed > .ch { display: none; }
.json .collapsed > .cnt::after { content: " \2026  "; }
.json .tog { display: inline-block; width: 1.1em; color: #6e7781; cursor: pointer; user-select: none; }
.json .key { color: #0451a5; }
.json .str { color: #0a7d22; }
.json .num { color: #098658; }
.json .bool { color: #0000ff; }
.json .nul { color: #a0a0a0; }
.json .brk, .json .col, .json .com { color: #57606a; }
.json .cnt { font-size: 90%; color: #8c959f; }
.app-status { display: flex; height: 26px; overflow: hidden; color: #3a3a3a; white-space: nowrap; background: var(--w-bg); border-top: 1px solid var(--w-line); border-radius: 0 0 8px 8px; }
.app-status span { padding: 4px 12px; border-right: 1px solid var(--w-line); }
.app-status span:last-child { border-right: 0; }
.app-hint { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* 菜单: 菜单栏上的按钮, 点开一列; 子菜单悬停展开 (向右放不下就向左, site.js 加 .left) */
.app-m { position: relative; }
.app-m > button { height: 28px; padding: 0 9px; border-radius: 4px; }
.app-m > button:hover, .app-m.open > button { background: var(--w-hover); }
.app-menu { position: absolute; z-index: 10; display: none; min-width: 220px; padding: 4px; white-space: nowrap; background: #fff; border: 1px solid #d9d9d9; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); }
.app-m.open > .app-menu { display: block; top: 100%; left: 0; }
.app-it { position: relative; display: flex; align-items: center; gap: 24px; padding: 5px 10px 5px 28px; border-radius: 4px; cursor: default; }
.app-it:hover { background: var(--w-hover); }
.app-it:hover > .app-menu { display: block; top: -5px; left: 100%; }
.app-it.left:hover > .app-menu { left: auto; right: 100%; }
.app-it kbd { margin-left: auto; font: inherit; color: #6b6b6b; }
.app-it.sub::after { content: ""; width: 5px; height: 5px; margin-left: auto; border: solid #5f5f5f; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.app-sep { height: 1px; margin: 4px 0; background: var(--w-line); }
/* 手机上窗口太窄: 菜单不展开, 标签能切; 有预览的只显示预览 */
@media (max-width: 760px) {
  .app-bar { pointer-events: none; }
  .app-ctl i { width: 32px; }
  .app-tabs button, .app-tabs .add { padding: 6px 10px; }
  .app-body { height: 420px; }
  .app-body.split > .app-text { display: none; }
  .app-body.split > .app-pv { border-left: 0; box-shadow: none; }
}

/* ── 页脚: 一行 ── */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 18px; padding-bottom: 18px; font-size: 12.5px; color: var(--ink-3); }
.foot nav { display: flex; gap: 18px; margin-left: auto; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }

/* ── 404 ── */
.nf { min-height: calc(100svh - 48px - 60px); display: flex; align-items: center; }
.nf .wrap { width: 100%; }
