/* 景中園大樓管理委員會：沉穩的深青色＋溫暖的琥珀色，像一份整理好的社區年報 */
:root {
  --teal: #1c4e5a;
  --teal-2: #2b6b78;
  --teal-l: #e5eff0;
  --amber: #c8892b;
  --amber-l: #fbf1df;
  --paper: #f6f4ef;
  --card: #ffffff;
  --ink: #1e2a2e;
  --muted: #5c6a6e;
  --line: #e2ddd2;
  --red: #b23a2e;
  --display: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --body: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.8; }
a { color: var(--teal-2); }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 6px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--teal) 0%, #163f49 100%); color: #fff; padding-block: 56px 48px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -40px; width: 420px; height: 300px; opacity: .09;
  background: repeating-linear-gradient(90deg, #fff 0 34px, transparent 34px 46px), repeating-linear-gradient(0deg, transparent 0 28px, var(--teal) 28px 36px);
  clip-path: polygon(0 30%, 20% 30%, 20% 10%, 45% 10%, 45% 0, 70% 0, 70% 20%, 100% 20%, 100% 100%, 0 100%); }
.hero-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; position: relative; z-index: 1; }
.kicker { margin: 0; color: #f3c77c; font-weight: 700; letter-spacing: .24em; font-size: 14px; }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(36px, 6vw, 58px); line-height: 1.2; margin: 8px 0 14px; letter-spacing: .06em; }
.lead { margin: 0 0 18px; color: #d7e6e8; font-size: 17px; max-width: 30em; }
.term { margin: 0; display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 16px; font-size: 14px; color: #e9f2f3; }
.term span { font-weight: 700; color: #fff; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.facts div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 14px 16px; }
.facts dt { font-size: 13px; color: #b9d0d3; letter-spacing: .1em; }
.facts dd { margin: 2px 0 0; font-family: var(--display); font-size: 34px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts small { font-family: var(--body); font-size: 13px; font-weight: 500; color: #d7e6e8; margin-left: 4px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(246,244,239,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.nav-in::-webkit-scrollbar { display: none; }
.nav a { flex: none; text-decoration: none; color: var(--teal); font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px; }
.nav a:hover, .nav a:focus-visible { background: var(--teal-l); }

/* Sections */
.sec { padding-block: 52px; }
.sec.alt { background: #fff; border-block: 1px solid var(--line); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 22px; }
.sec-head h2 { margin: 0; font-family: var(--display); font-size: clamp(26px, 4vw, 34px); color: var(--teal); letter-spacing: .04em; position: relative; padding-left: 16px; }
.sec-head h2::before { content: ""; position: absolute; left: 0; top: .25em; bottom: .25em; width: 5px; border-radius: 3px; background: var(--amber); }
.sec-head p { margin: 0; color: var(--muted); font-size: 15px; }
.note { color: var(--muted); font-size: 14px; margin: 18px 0 0; }

/* News */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters button { font: inherit; font-size: 14px; font-weight: 700; color: var(--teal); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 16px; cursor: pointer; }
.filters button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.news { display: grid; gap: 10px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.item.pin { border-left: 5px solid var(--amber); }
.item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto auto 1fr; gap: 4px 12px; align-items: center; padding: 14px 18px; }
.item summary::-webkit-details-marker { display: none; }
.item summary::after { content: "＋"; grid-column: 4; color: var(--teal-2); font-weight: 700; }
.item[open] summary::after { content: "－"; }
.item time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; white-space: nowrap; }
.item b { font-size: 17px; line-height: 1.5; }
.tag { justify-self: start; font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 999px; white-space: nowrap; background: var(--teal-l); color: var(--teal); }
.t-工程 { background: var(--amber-l); color: #8a5a12; }
.t-安全 { background: #fbe6e3; color: var(--red); }
.t-會議 { background: #e9e6f5; color: #4b3f8a; }
.t-公告 { background: #e8f2e3; color: #3d6b2a; }
.item .body { padding: 0 18px 16px; border-top: 1px dashed var(--line); }
.item .body p { margin: 12px 0 0; }

/* Members */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 16px; }
.member { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; position: relative; }
.member.lead-m { background: var(--teal); color: #fff; border-color: var(--teal); }
.seat { position: absolute; top: 16px; right: 16px; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--amber); }
.member h3 { margin: 0; font-size: 19px; color: var(--teal); }
.member.lead-m h3 { color: #fff; }
.who { margin: 0; color: #f3c77c; font-weight: 700; }
.member ul { margin: 10px 0 0; padding-left: 1.2em; font-size: 15px; }
.member li { margin: 2px 0; }

/* Track */
.track { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.trk { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.trk b { display: block; font-size: 17px; margin-top: 6px; }
.trk p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.st { font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 999px; }
.st.doing { background: var(--amber-l); color: #8a5a12; }
.st.todo { background: #eceae4; color: var(--muted); }
.st.done { background: #e3f1e6; color: #2f6b3e; }
.archive { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.archive summary { cursor: pointer; font-weight: 700; color: var(--teal); }
.archive ol { list-style: none; padding: 0; margin: 12px 0 0; columns: 2 280px; column-gap: 32px; }
.archive li { break-inside: avoid; padding: 4px 0; border-bottom: 1px dotted var(--line); font-size: 15px; }
.archive time { display: inline-block; min-width: 6.2em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Equipment */
.equip { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.equip article { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.equip h3 { margin: 0 0 10px; font-size: 19px; color: var(--teal); display: flex; align-items: center; gap: 10px; }
.ico { width: 34px; height: 34px; border-radius: 10px; background: var(--teal); color: #fff; display: inline-grid; place-items: center; font-size: 17px; flex: none; }
.equip dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.equip dt { color: var(--muted); white-space: nowrap; }
.equip dd { margin: 0; }

/* Rules */
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; counter-reset: r; }
.rule { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.rule b { color: var(--teal); font-size: 17px; }
.rule p { margin: 4px 0 0; font-size: 15px; }

/* Law */
.laws { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.laws a { text-decoration: none; font-weight: 700; font-size: 14px; color: var(--teal); background: var(--teal-l); border-radius: 999px; padding: 5px 14px; }
.laws a:hover { background: var(--teal); color: #fff; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 14px 0; color: var(--ink); }
.faq p { margin: 0 0 12px; font-size: 15px; }

/* Contact */
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.step span { font-size: 13px; font-weight: 700; color: var(--amber); letter-spacing: .1em; }
.step h3 { margin: 2px 0 6px; font-size: 19px; color: var(--teal); }
.step p { margin: 0; font-size: 15px; }
.step.emergency { background: #fdf0ee; border-color: #f0c9c3; }
.step.emergency span, .step.emergency h3 { color: var(--red); }

/* Footer */
.foot { background: #14363f; color: #c4d6d9; font-size: 14px; padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot p { margin: 0 0 4px; }
.foot-name { font-family: var(--display); font-size: 18px; color: #fff; font-weight: 700; }
.foot a { color: #f3c77c; font-weight: 700; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
#viewCount { font-variant-numeric: tabular-nums; }
#viewCount b { color: #fff; }

@media (max-width: 760px) {
  .hero { padding-block: 40px 32px; }
  .hero-in { grid-template-columns: 1fr; gap: 24px; }
  .facts { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .facts div { padding: 10px; }
  .facts dd { font-size: 26px; }
  .facts small { display: block; margin: 0; font-size: 11px; }
  .item summary { grid-template-columns: auto 1fr auto; }
  .item summary b { grid-column: 1 / -1; grid-row: 2; }
  .item summary::after { grid-column: 3; grid-row: 1; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .nav, .filters, .foot a { display: none; } .hero { background: #fff; color: #000; } }
