/* RecLetter — 专业亲和风：白页眉 + 绿色顶条，蓝+绿，「信笺」模板块（blue / green） */
:root{
  --bg:#F7FAFC;
  --panel:#ffffff;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --brand:#2563EB;
  --brand2:#059669;
  --brand-soft:#eff6ff;
  --green-soft:#ecfdf5;
  --radius:14px;
  --shadow:0 1px 2px rgba(15,23,42,.06),0 8px 24px rgba(37,99,235,.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-rec header.site{
  background:var(--panel);color:var(--ink);border-top:4px solid var(--brand2);border-bottom:1px solid var(--line);
  box-shadow:0 1px 2px rgba(15,23,42,.04);position:sticky;top:0;z-index:20;
}
body.layout-rec header.site .wrap{display:flex;align-items:center;justify-content:space-between;height:64px;gap:16px}
body.layout-rec .brand{display:flex;align-items:center;gap:10px;color:var(--header-ink);font-weight:800;font-size:1.15rem;letter-spacing:-.01em}
body.layout-rec .brand:hover{text-decoration:none}
body.layout-rec .logo{width:30px;height:30px;flex:0 0 auto}
body.layout-rec .brand-name{color:var(--header-ink)}
body.layout-rec nav.site{display:flex;gap:18px;flex-wrap:wrap}
body.layout-rec nav.site a{color:var(--brand);font-weight:600;font-size:.95rem}
body.layout-rec nav.site a:hover{color:var(--brand2);text-decoration:underline}

/* main */
body.layout-rec main{width:100%;max-width:1080px;margin:0 auto;padding:40px 20px 56px;flex:1 0 auto}
body.layout-rec 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-rec .sub{color:var(--muted);font-size:1.05rem;margin:0 0 18px}
body.layout-rec .local-badge{display:inline-block;background:var(--brand-soft);color:var(--brand);border:1px solid #dbeafe;font-size:.85rem;font-weight:600;padding:6px 12px;border-radius:999px;margin-bottom:22px}
body.layout-rec .content-body.prose > *{margin:0 0 18px}
body.layout-rec .content-body.prose h2{font-size:1.4rem;margin:28px 0 10px;letter-spacing:-.01em;color:var(--ink)}
body.layout-rec .content-body.prose p{color:#334155}

/* template block — 信笺：蓝标题条 + 白纸底 */
body.layout-rec .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(37,99,235,.12);overflow:hidden}
body.layout-rec .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-rec .tpl-ico{display:inline-flex;color:var(--brand);flex:0 0 auto}
body.layout-rec .tpl-title{font-weight:700;font-size:1rem;color:var(--ink);letter-spacing:.01em}
body.layout-rec 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:#ffffff;resize:vertical;
}
body.layout-rec .copybtn{
  margin-left:auto;display:inline-flex;align-items:center;
  background:var(--brand);color:#fff;border:1px solid #1d4ed8;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-rec .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-rec .copybtn:hover{background:#1d4ed8;transform:translateY(-1px);box-shadow:0 4px 12px rgba(37,99,235,.35)}
body.layout-rec .fill-list{margin:6px 0 4px;padding-left:20px;color:#334155}
body.layout-rec .fill-list li{margin:4px 0}
body.layout-rec .tips-note{background:var(--green-soft);border:1px solid #bbf7d0;border-radius:12px;padding:14px 16px;margin-top:10px}
body.layout-rec .tips-note h2{margin-top:0;color:var(--brand2)}
body.layout-rec .tips-note p{margin:0;color:#065f46}
body.layout-rec .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-rec .grid-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
body.layout-rec .grid-links a{background:var(--brand-soft);border:1px solid #dbeafe;color:var(--brand);padding:8px 14px;border-radius:999px;font-size:.92rem;font-weight:600;transition:background .18s var(--ease)}
body.layout-rec .grid-links a:hover{background:#dbeafe;text-decoration:none}

/* home cards */
body.layout-rec main>section{margin:34px 0}
body.layout-rec main>section>h2{font-size:1.5rem;margin:0 0 14px;letter-spacing:-.01em}
body.layout-rec .cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
body.layout-rec .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-rec .card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
body.layout-rec .card h3{margin:0 0 6px;font-size:1.05rem}
body.layout-rec .card h3 a{color:var(--ink)}
body.layout-rec .card p{margin:0;color:var(--muted);font-size:.9rem}

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

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

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

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