/* Zaptool — design language: Supabase 邏輯
   ① 近黑中性畫布 ② 單一綠 accent 只給 CTA/重點 ③ 1px 低對比邊框定結構
   ④ 6–8px 圓角 ⑤ 次要資訊中性灰 ⑥ hover = 邊框/文字微亮 (.15s) */
:root {
    --bg: #131313; --panel: #1c1c1c; --panel-2: #181818;
    --ink: #ededed; --muted: #8f8f8f;
    --accent: #3ecf8e; --accent-dim: #2dba7c; --accent-ink: #0b0b0b;
    --border: #2a2a2a; --border-strong: #3a3a3a;
    --ok: #3ecf8e; --err: #ff6369;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    --radius: 8px; --radius-sm: 6px;
}
* { box-sizing: border-box; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
main { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #5fe0a8; text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--mono); background: var(--panel); padding: .12em .4em;
    border: 1px solid var(--border); border-radius: 4px; font-size: .88em; }

.site-header { display: flex; align-items: center; justify-content: space-between;
    max-width: 720px; margin: 0 auto; padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); letter-spacing: -.01em; }
.brand::before { content: "⚡"; margin-right: .4rem; }
.site-header nav a { color: var(--muted); margin-left: 1rem; }
.site-header nav a:hover { color: var(--ink); text-decoration: none; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted);
    text-align: center; padding: 2rem 1rem; font-size: .9rem; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: .6rem 0 .4rem;
    font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; font-weight: 600; letter-spacing: -.01em; }
.lede { color: var(--muted); margin-top: .2rem; font-size: 1.02rem; }
.muted { color: var(--muted); font-weight: 400; }

.tool { background: var(--panel-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; margin: 1.25rem 0; }
.tool label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
#cron-input { width: 100%; font-family: var(--mono); font-size: 1.4rem;
    padding: .7rem .8rem; background: var(--bg); color: var(--ink);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    letter-spacing: .04em; transition: border-color .15s ease, box-shadow .15s ease; }
#cron-input:focus { outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(62, 207, 142, .15); }
.error { color: var(--err); min-height: 1.2rem; font-size: .88rem; margin-top: .4rem; }

.presets { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; }
.presets button, .copy {
    background: var(--panel); color: var(--ink); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: .35rem .8rem; font-size: .85rem;
    cursor: pointer; transition: border-color .15s ease, color .15s ease,
    background .15s ease; }
.presets button:hover, .copy:hover { border-color: var(--accent); color: var(--accent);
    background: rgba(62, 207, 142, .06); }

.result h2 { font-size: 1rem; }
.explanation { font-size: 1.1rem; }
table.fields { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.fields td { padding: .35rem .5rem; border-bottom: 1px solid var(--border);
    vertical-align: top; }
table.fields td:first-child { color: var(--muted); width: 9rem; }
.next-runs { list-style: none; padding: 0; margin: 0; font-family: var(--mono);
    font-size: .95rem; }
.next-runs li { padding: .3rem 0; border-bottom: 1px solid var(--border); }
.next-runs li::before { content: "›"; color: var(--accent); margin-right: .6rem; }

.expr-card { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
    background: var(--panel-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0;
    transition: border-color .15s ease; }
.expr-card:hover { border-color: var(--border-strong); }
.big-expr { font-size: 1.6rem; background: transparent; border: none; padding: 0;
    letter-spacing: .05em; color: var(--accent); }
.crumbs { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); text-decoration: none; }
.cta { display: inline-block; background: var(--accent); color: var(--accent-ink);
    font-weight: 600; padding: .6rem 1.15rem; border-radius: var(--radius-sm);
    margin: .5rem 0 1rem; border: 1px solid var(--accent-dim);
    transition: background .15s ease; }
.cta:hover { background: #5fe0a8; color: var(--accent-ink);
    text-decoration: none; }

.prose { color: var(--ink); }
.prose h3 { font-size: 1rem; margin: 1.2rem 0 .35rem; font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem;
    margin: .8rem 0; }
.prose table th { text-align: left; color: var(--muted); font-weight: 500;
    padding: .4rem .5rem; border-bottom: 1px solid var(--border-strong); }
.prose table td { padding: .4rem .5rem; border-bottom: 1px solid var(--border); }
.related, .variants { list-style: none; padding: 0; }
.related li { padding: .4rem 0; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; gap: 1rem; }
table.variants { width: 100%; border-collapse: collapse; }
table.variants th { text-align: left; color: var(--muted); font-weight: 500;
    padding: .4rem .5rem; width: 14rem; border-bottom: 1px solid var(--border); }
table.variants td { padding: .4rem .5rem; border-bottom: 1px solid var(--border); }

/* chmod 工具 */
#chmod-input { width: 100%; font-family: var(--mono); font-size: 1.4rem;
    padding: .7rem .8rem; background: var(--bg); color: var(--ink);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    letter-spacing: .08em; transition: border-color .15s ease, box-shadow .15s ease; }
#chmod-input:focus { outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(62, 207, 142, .15); }
.perm-grid { width: 100%; border-collapse: collapse; margin: .9rem 0; font-size: .95rem; }
.perm-grid th, .perm-grid td { padding: .4rem .5rem; text-align: center;
    border-bottom: 1px solid var(--border); }
.perm-grid thead th { color: var(--muted); font-weight: 500; }
.perm-grid tbody th { text-align: left; color: var(--ink); font-weight: 600; }
.perm-grid input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); cursor: pointer; }
.danger-note { background: rgba(255, 99, 105, .07); border: 1px solid rgba(255, 99, 105, .35);
    border-radius: var(--radius-sm); padding: .6rem .85rem; font-size: .92rem; margin: .6rem 0; }
pre { background: var(--panel-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .75rem .95rem; overflow: auto; }
pre code { background: transparent; border: none; padding: 0; font-size: .9rem; }

/* gotchas 清單 */
.gotchas li { margin-bottom: .5rem; }

/* cron 監控變現呼籲框 — 綠色 accent 的唯一大面積使用處（轉換重點） */
.monitor-cta { background: rgba(62, 207, 142, .05);
    border: 1px solid rgba(62, 207, 142, .25);
    border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
    padding: .9rem 1.1rem; margin: 1.8rem 0; }
.monitor-cta h2 { margin-top: 0; }
.disclosure { font-size: .82rem; margin-top: .2rem; }
