/* DemandKit — 正式法务风：白页眉 + 金色顶条，深蓝+金，「公文纸」模板块（navy / gold） */
:root{
  --bg:#F8FAFC;
  --panel:#ffffff;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --brand:#1E3A8A;
  --brand2:#CA8A04;
  --brand-soft:#eef2ff;
  --gold-soft:#fef9ec;
  --radius:14px;
  --shadow:0 1px 2px rgba(15,23,42,.06),0 8px 24px rgba(30,58,138,.10);
  --ease:cubic-bezier(.22,.61,.36,1);
  --header-ink:#0f172a;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.65;font-size:17px; min-height:100vh;display:flex;flex-direction:column;
}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:1080px;margin:0 auto;padding:0 20px}

/* header — 白底 + 金色顶条 + 深蓝细下沿（正式感） */
body.layout-legal header.site{
  background:var(--panel);color:var(--ink);border-top:4px solid var(--brand2);border-bottom:2px solid var(--brand);
  box-shadow:0 1px 2px rgba(15,23,42,.05);position:sticky;top:0;z-index:20;
}
body.layout-legal header.site .wrap{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
body.layout-legal .brand{display:flex;align-items:center;gap:10px;color:var(--header-ink);font-weight:800;font-size:1.15rem;letter-spacing:-.01em}
body.layout-legal .brand:hover{text-decoration:none}
body.layout-legal .logo{width:30px;height:30px;flex:0 0 auto}
body.layout-legal .brand-name{color:var(--header-ink)}
body.layout-legal nav.site{display:flex;gap:18px;flex-wrap:wrap}
body.layout-legal nav.site a{color:var(--brand);font-weight:600;font-size:.95rem}
body.layout-legal nav.site a:hover{color:var(--brand2);text-decoration:underline}

/* main */
body.layout-legal main{width:100%;max-width:1080px;margin:0 auto;padding:40px 20px 56px;flex:1 0 auto}
body.layout-legal h1{font-size:clamp(1.9rem,4.5vw,2.7rem);line-height:1.14;margin:0 0 8px;letter-spacing:-.02em;font-weight:800}
body.layout-legal .sub{color:var(--muted);font-size:1.05rem;margin:0 0 18px}
body.layout-legal .local-badge{display:inline-block;background:var(--brand-soft);color:var(--brand);border:1px solid #dbe1fb;font-size:.85rem;font-weight:600;padding:6px 12px;border-radius:999px;margin-bottom:22px}
body.layout-legal .content-body.prose > *{margin:0 0 18px}
body.layout-legal .content-body.prose h2{font-size:1.4rem;margin:28px 0 10px;letter-spacing:-.01em;color:var(--ink)}
body.layout-legal .content-body.prose p{color:#334155}

/* template block — 公文纸：强阴影 + 深蓝标题条（负边距贴合卡片边） */
body.layout-legal .tpl-block{background:var(--panel);border:1px solid var(--line);border-top:3px solid var(--brand2);border-radius:var(--radius);padding:16px;box-shadow:0 10px 30px rgba(30,58,138,.12);overflow:hidden}
body.layout-legal .tpl-head{display:flex;align-items:center;gap:10px;margin:-16px -16px 14px;padding:13px 16px;background:var(--panel);border-bottom:1px solid var(--line)}
body.layout-legal .tpl-ico{display:inline-flex;color:var(--brand);flex:0 0 auto}
body.layout-legal .tpl-title{font-weight:700;font-size:1rem;color:var(--ink);letter-spacing:.01em}
body.layout-legal textarea{
  width:100%;border:1px solid var(--line);border-radius:12px;padding:14px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92rem;
  line-height:1.55;color:#1e293b;background:#fcfcfd;resize:vertical;
}
body.layout-legal .copybtn{
  margin-left:auto;display:inline-flex;align-items:center;
  background:var(--brand2);color:#231a00;border:1px solid #b07d04;border-radius:10px;
  padding:9px 15px;font-weight:700;font-size:.9rem;cursor:pointer;
  transition:background .18s var(--ease),transform .18s var(--ease),box-shadow .18s var(--ease);
}
body.layout-legal .copybtn::before{content:"";width:15px;height:15px;margin-right:8px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center/contain no-repeat}
body.layout-legal .copybtn:hover{background:#b07d04;color:#fff;transform:translateY(-1px);box-shadow:0 4px 12px rgba(202,138,4,.35)}
body.layout-legal .fill-list{margin:6px 0 4px;padding-left:20px;color:#334155}
body.layout-legal .fill-list li{margin:4px 0}
body.layout-legal .legal-note{background:var(--gold-soft);border:1px solid #f1e4b8;border-radius:12px;padding:14px 16px;margin-top:10px}
body.layout-legal .legal-note h2{margin-top:0;color:var(--brand2)}
body.layout-legal .legal-note p{margin:0;color:#5b4a08}
body.layout-legal .content-body.prose .author{margin-top:22px;padding-top:14px;border-top:1px dashed var(--line);font-size:.88rem;color:var(--muted);font-style:italic}

/* related */
body.layout-legal .grid-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
body.layout-legal .grid-links a{background:var(--brand-soft);border:1px solid #dbe1fb;color:var(--brand);padding:8px 14px;border-radius:999px;font-size:.92rem;font-weight:600;transition:background .18s var(--ease)}
body.layout-legal .grid-links a:hover{background:#dbe1fb;text-decoration:none}

/* home cards */
body.layout-legal main>section{margin:34px 0}
body.layout-legal main>section>h2{font-size:1.5rem;margin:0 0 14px;letter-spacing:-.01em}
body.layout-legal .cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
body.layout-legal .card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px;transition:transform .18s var(--ease),box-shadow .18s var(--ease)}
body.layout-legal .card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
body.layout-legal .card h3{margin:0 0 6px;font-size:1.05rem}
body.layout-legal .card h3 a{color:var(--ink)}
body.layout-legal .card p{margin:0;color:var(--muted);font-size:.9rem}

/* trust */
body.layout-legal .tool-panel.prose{max-width:1080px;margin:0 auto}
body.layout-legal .tool-panel.prose h2{font-size:1.3rem;margin:22px 0 8px}
body.layout-legal .tool-panel.prose p{color:#334155}

/* ad slots */
body.layout-legal .ad-slot{margin:26px 0;min-height:8px}
body.layout-legal .ad-slot:empty{display:none}

/* footer */
body.layout-legal footer.site{background:var(--panel);border-top:2px solid var(--brand);margin-top:40px;color:var(--muted);font-size:.9rem}
body.layout-legal footer.site .wrap{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:20px}
body.layout-legal footer.site a{color:var(--muted);font-weight:600;margin-left:20px}footer.site a:first-child{margin-left:0}
body.layout-legal footer.site a:hover{color:var(--brand)}

@media (max-width:760px){
  body.layout-legal main{padding:28px 16px 40px}
  body.layout-legal header.site .wrap{height:auto;flex-direction:column;align-items:flex-start;padding-top:10px;padding-bottom:10px;gap:8px}
  body.layout-legal nav.site{gap:12px}
  body.layout-legal .cards{grid-template-columns:1fr}
  body.layout-legal footer.site .wrap{flex-direction:column}
}
