/* 文章页版式（inc/article-layout.php，2026-11-23 第二版）
 * 页头四种构图：c-cover 整幅封面压标题；c-split 左右分屏；c-wide 标题在上、宽幅横图在下；c-inset 标题与竖图对开。
 * 题材（lay-*）决定强调色和正文小标题、列表、配图的处理；变体（v-a/b/c）决定用哪种构图。照片不裁成特殊形状，不铺花纹底。 */

.ed-single{overflow-x:clip;--acc:var(--ed-red);--acc-soft:#F4ECE2}
.lay-food{--acc:#B4432A;--acc-soft:#F6E9E1}
.lay-scape{--acc:#2C6C70;--acc-soft:#E3EEEC}
.lay-plant{--acc:#2A5D7C;--acc-soft:#E2EBF1}
.lay-estate{--acc:#566F44;--acc-soft:#E8EDE0}
.lay-guide{--acc:#A8730E;--acc-soft:#F5ECD9}
.lay-craft{--acc:#8A4B2A;--acc-soft:#F2E7DC}
.lay-rite{--acc:#8C2F2B;--acc-soft:#F3E3DF}
.lay-field{--acc:#3D6A4C;--acc-soft:#E4ECE3}

/* ---------- 页头通用 ---------- */
.ed-single.has-hero .ed-ahead{position:relative;text-align:left;max-width:1180px}
.ed-single.has-hero .ed-ahead .ph-crumbs{justify-content:flex-start}
.ed-single.has-hero .ed-kicker{display:inline-flex;align-items:center;gap:10px;margin-top:26px;color:var(--acc);font-size:13px;letter-spacing:.1em}
.ed-single.has-hero .ed-kicker::before{content:"";width:28px;height:2px;background:currentColor}
.ed-single.has-hero .ed-ahead h1{margin:14px 0 0;max-width:15em;font-size:46px;line-height:1.2;letter-spacing:-.005em}
.ed-single.has-hero .ed-ahead-deck{margin:18px 0 0;max-width:34em;font-size:17.5px;line-height:1.8;color:var(--ed-ink-2)}
.ed-single.has-hero .ed-byline{justify-content:flex-start;gap:6px 18px;margin:24px 0 0;padding:14px 0 0;border-bottom:0;border-top:1px solid var(--ed-rule)}
.ed-single .ah-hero{margin:0}
.ed-single .ah-hero img{display:block;width:100%;height:auto}
.ed-single .ah-hero figcaption{margin-top:10px;font-size:12px;line-height:1.6;color:var(--ed-mute)}
.ed-single .ah-hero figcaption a{color:inherit}
.ed-single.has-hero .ed-abody{margin-top:60px}

/* 整幅封面：图铺满屏宽，标题压在图的下部 */
.c-cover.has-hero .ed-ahead{display:grid;max-width:none;padding:0}
.c-cover.has-hero .ah-hero,.c-cover.has-hero .ah-text{grid-area:1/1}
.c-cover.has-hero .ah-hero{position:relative;width:100vw;margin-left:calc(50% - 50vw)}
.c-cover.has-hero .ah-hero img{height:min(82vh,780px);object-fit:cover}
.c-cover.has-hero .ah-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,10,10,.38) 0%,transparent 20%,transparent 42%,rgba(8,10,10,.82) 100%);pointer-events:none}
.c-cover.has-hero .ah-hero figcaption{position:absolute;right:20px;bottom:14px;z-index:2;max-width:380px;margin:0;text-align:right;font-size:11px;color:rgba(255,255,255,.65)}
.c-cover.has-hero .ah-text{position:relative;z-index:1;display:flex;flex-direction:column;width:min(1180px,calc(100% - 40px));margin:0 auto;padding:24px 0 72px;color:#fff}
.c-cover.has-hero .ah-text .ph-crumbs,.c-cover.has-hero .ah-text .ph-crumbs a{color:rgba(255,255,255,.85)}
.c-cover.has-hero .ah-text>.ed-kicker{margin-top:auto;color:#fff}
.c-cover.has-hero .ed-ahead h1{max-width:17em;font-size:56px;line-height:1.15;color:#fff;text-shadow:0 2px 28px rgba(0,0,0,.28)}
.c-cover.has-hero .ed-ahead-deck{color:rgba(255,255,255,.88)}
.c-cover.has-hero .ed-byline{max-width:34em;color:rgba(255,255,255,.78);border-top-color:rgba(255,255,255,.28)}
.c-cover.has-hero .ed-byline .ed-save{color:#fff;border-color:rgba(255,255,255,.5);background:transparent}

/* 左右分屏：图贴到屏幕边，另一半是题材的浅色底 */
.c-split.has-hero .ed-ahead{display:grid;grid-template-columns:1fr 1fr;width:100vw;max-width:none;margin-left:calc(50% - 50vw);padding:0;background:var(--acc-soft)}
.c-split.has-hero .ah-hero{position:relative}
.c-split.has-hero .ah-hero img{height:min(80vh,740px);object-fit:cover}
.c-split.has-hero .ah-hero figcaption{position:absolute;left:0;right:0;bottom:0;margin:0;padding:28px 20px 12px;font-size:11px;color:rgba(255,255,255,.82);background:linear-gradient(transparent,rgba(0,0,0,.55))}
.c-split.has-hero .ah-text{align-self:center;max-width:620px;padding:56px 56px 56px 72px}
.c-split.has-hero .ed-ahead h1{font-size:44px}
.c-split.has-hero .ed-byline{border-top-color:color-mix(in srgb,var(--acc) 25%,transparent)}
.c-split.has-hero.v-b .ah-hero,.c-split.has-hero.v-c .ah-hero{order:2}
.c-split.has-hero.v-b .ah-text,.c-split.has-hero.v-c .ah-text{justify-self:end;padding:56px 72px 56px 56px}

/* 宽幅横图：标题和导语分左右两栏，下面一张贯通的横图 */
.c-wide.has-hero .ed-ahead{display:block}
.c-wide.has-hero .ah-text{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);grid-template-areas:"crumbs crumbs" "kicker deck" "title deck" "title byline";column-gap:64px;align-items:end}
.c-wide.has-hero .ah-text .ph-crumbs{grid-area:crumbs}
.c-wide.has-hero .ah-text .ed-kicker{grid-area:kicker;justify-self:start;align-self:end;margin-top:34px}
.c-wide.has-hero .ah-text h1{grid-area:title;align-self:start;font-size:50px}
.c-wide.has-hero .ah-text .ed-ahead-deck{grid-area:deck;margin-top:34px;padding-left:20px;border-left:2px solid var(--acc)}
.c-wide.has-hero .ah-text .ed-byline{grid-area:byline;margin-left:22px}
.c-wide.has-hero .ah-hero{margin-top:40px}
.c-wide.has-hero .ah-hero img{aspect-ratio:21/9;object-fit:cover}
.c-wide.has-hero .ah-hero figcaption{text-align:right}

/* 对开：标题占七份，竖图占五份，图后衬一块题材色 */
.c-inset.has-hero .ed-ahead{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:72px;align-items:center;padding-top:8px}
.c-inset.has-hero .ah-hero{position:relative}
.c-inset.has-hero .ah-hero::before{content:"";position:absolute;top:22px;left:22px;right:-22px;bottom:34px;background:var(--acc-soft);z-index:-1}
.c-inset.has-hero .ah-hero img{aspect-ratio:4/5;object-fit:cover}
.c-inset.has-hero .ed-ahead h1{font-size:48px}

/* ---------- 正文 ---------- */
.ed-single .ph-content a{text-decoration-color:color-mix(in srgb,var(--acc) 55%,transparent)}
.ed-single.has-hero .ph-content>p:first-child{font-size:1.08em}
.ed-single.has-hero .ph-content>p:first-child::first-letter{float:left;margin:7px 12px 0 0;font:700 3.3em/.84 var(--ed-serif);color:var(--acc)}
.ed-single .ph-content figure figcaption{padding-left:12px;border-left:2px solid var(--acc)}
.ed-single .ph-content blockquote{border-left-color:var(--acc)}

/* 景点、手工艺、节日、动植物、美食：小标题上方一道短色线 */
.lay-scape .ph-content h2,.lay-rite .ph-content h2,.lay-field .ph-content h2,.lay-craft .ph-content h2,.lay-food .ph-content h2{padding-top:18px;background:linear-gradient(var(--acc),var(--acc)) left top/36px 3px no-repeat}

/* 美食：做法章节变成菜谱卡，步骤圆形编号，原料带方框 */
.lay-food .ph-content h2.is-recipe{margin-top:2.4em;padding:18px 24px;background:#2D2A26;color:#FBF7F0;border-radius:4px}
.lay-food .ph-content ol{list-style:none;counter-reset:step;padding:0}
.lay-food .ph-content ol>li{counter-increment:step;position:relative;padding:3px 0 16px 52px;margin:0 0 14px;border-bottom:1px solid var(--ed-rule)}
.lay-food .ph-content ol>li::before{content:counter(step);position:absolute;left:0;top:0;width:34px;height:34px;border-radius:50%;background:var(--acc);color:#fff;font:700 16px/34px var(--ed-serif);text-align:center}
.lay-food .ph-content ul{list-style:none;padding:16px 22px;background:var(--acc-soft);border-radius:4px}
.lay-food .ph-content ul>li{position:relative;padding-left:24px;margin:6px 0}
.lay-food .ph-content ul>li::before{content:"";position:absolute;left:2px;top:.62em;width:9px;height:9px;border:1.5px solid var(--acc);border-radius:2px}

/* 工业园：章节编号 §01，图注编号 */
.lay-plant .ph-content{counter-reset:sec fig}
.lay-plant .ph-content h2{counter-increment:sec}
.lay-plant .ph-content h2::before{content:"§ " counter(sec,decimal-leading-zero);display:block;margin-bottom:8px;font:600 12px "SF Mono",Menlo,monospace;letter-spacing:.14em;color:var(--acc)}
.lay-plant .ph-content figure{counter-increment:fig}
.lay-plant .ph-content figure figcaption::before{content:"图 " counter(fig) "　";font-weight:600;color:var(--acc)}

/* 小区：章节编号 No.01 */
.lay-estate .ph-content{counter-reset:lot}
.lay-estate .ph-content h2{counter-increment:lot}
.lay-estate .ph-content h2::before{content:"No." counter(lot,decimal-leading-zero);display:block;margin-bottom:8px;font:600 12px "SF Mono",Menlo,monospace;letter-spacing:.12em;color:var(--acc)}

/* 出行、生活服务：每个小标题是一步，列表打勾，宽屏时配图靠右 */
.lay-guide .ph-content{counter-reset:step}
.lay-guide .ph-content h2{counter-increment:step;position:relative;padding-left:58px;min-height:42px}
.lay-guide .ph-content h2::before{content:counter(step);position:absolute;left:0;top:-1px;width:40px;height:40px;border-radius:50%;background:var(--acc);color:#fff;font:700 19px/40px var(--ed-sans);text-align:center}
.lay-guide .ph-content ul{list-style:none;padding-left:2px}
.lay-guide .ph-content ul>li{position:relative;padding-left:26px;margin:8px 0}
.lay-guide .ph-content ul>li::before{content:"";position:absolute;left:3px;top:.38em;width:7px;height:12px;border:solid var(--acc);border-width:0 2.5px 2.5px 0;transform:rotate(45deg)}
@media (min-width:1100px){
  .lay-guide .ph-content figure{float:right;width:44%;margin:.3em 0 1em 28px}
  .lay-guide .ph-content h2{clear:both}
}

/* ---------- 窄屏 ---------- */
@media (max-width:900px){
  .ed-single.has-hero .ed-ahead h1,.c-split.has-hero .ed-ahead h1,.c-inset.has-hero .ed-ahead h1,.c-wide.has-hero .ah-text h1{font-size:28px}
  .ed-single.has-hero .ed-ahead-deck{font-size:15.5px}
  .ed-single.has-hero .ed-abody{margin-top:34px}
  .c-cover.has-hero .ah-hero img{height:70vh}
  .c-cover.has-hero .ah-text{width:calc(100% - 32px);padding:14px 0 28px}
  .c-cover.has-hero .ed-ahead h1{font-size:29px}
  .c-split.has-hero .ed-ahead{grid-template-columns:1fr}
  .c-split.has-hero .ah-hero,.c-split.has-hero.v-b .ah-hero,.c-split.has-hero.v-c .ah-hero{order:0}
  .c-split.has-hero .ah-hero img{height:48vh}
  .c-split.has-hero .ah-text,.c-split.has-hero.v-b .ah-text,.c-split.has-hero.v-c .ah-text{max-width:none;padding:24px 16px 28px}
  .c-wide.has-hero .ah-text{display:block}
  .c-wide.has-hero .ah-text .ed-ahead-deck{margin-top:14px}
  .c-wide.has-hero .ah-text .ed-byline{margin-left:0}
  .c-wide.has-hero .ah-hero{margin:24px -16px 0}
  .c-wide.has-hero .ah-hero img{aspect-ratio:3/2}
  .c-wide.has-hero .ah-hero figcaption{padding:0 16px;text-align:left}
  .c-inset.has-hero .ed-ahead{grid-template-columns:1fr;gap:22px}
  .c-inset.has-hero .ah-hero{order:-1;margin:0 -16px}
  .c-inset.has-hero .ah-hero::before{display:none}
  .c-inset.has-hero .ah-hero img{aspect-ratio:4/3}
  .c-inset.has-hero .ah-hero figcaption{padding:0 16px}
  .lay-guide .ph-content h2{padding-left:50px}
  .lay-guide .ph-content h2::before{width:36px;height:36px;font-size:17px;line-height:36px}
}
