/* ============================================================
   orphan.css — 孤兒單專區共用元件 + 三個視覺主題
   載入方式：<body data-theme="a|b|c"> + <link href="/assets/css/orphan.css">
   ============================================================ */

body[data-theme] { --pad: clamp(1rem, 4vw, 2.5rem); }

/* ---------- 主題 A：街招 Signage（延伸現有） ---------- */


/* ---------- 主題 B：監管公報 Document ---------- */


/* ---------- 主題 C：急症警示 Alert ---------- */


body[data-theme] .site-head { backdrop-filter: saturate(1.2) blur(8px); }
body[data-theme="b"] .site-head { background: rgba(251,250,246,.96); border-bottom: 1px solid var(--rule); }
body[data-theme="b"] .brand-mark { background: transparent; color: var(--jade); border: 0; transform: none; padding: 0; font-family: var(--f-display); }
body[data-theme="b"] .nav-cta { background: var(--jade); border: 1px solid var(--jade); box-shadow: none; }
body[data-theme="b"] .btn { border-radius: 0; border-color: var(--ink); box-shadow: 3px 3px 0 var(--rule); }
body[data-theme="b"] .btn:hover { box-shadow: 3px 3px 0 var(--rule); transform: none; }
body[data-theme="b"] .card { box-shadow: none; border: 1px solid var(--rule); }
body[data-theme="b"] section { border-bottom: 1px solid var(--rule); }
body[data-theme="c"] .brand-mark { background: var(--signal); color: #fff; border-color: #fff; }
body[data-theme="c"] .btn { background: var(--ink); color: var(--paper); border-color: #fff; box-shadow: 4px 4px 0 var(--signal); }
body[data-theme="c"] .btn:hover { box-shadow: 6px 6px 0 var(--signal); }
body[data-theme="c"] .nav-cta { background: var(--signal); color: #fff; border-color: #fff; box-shadow: 4px 4px 0 #fff; }
body[data-theme="c"] .card { box-shadow: 5px 5px 0 #23262B; }
body[data-theme="c"] .sign { box-shadow: 4px 4px 0 var(--signal); }

/* ---------- 共用孤兒單元件 ---------- */
.notice-bar {
  background: var(--ink); color: var(--paper);
  font-size: .82rem; padding: .55rem 0; border-bottom: 3px solid var(--signal);
}
.notice-bar .wrap { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.notice-bar strong { color: var(--signal); font-weight: 800; }
body[data-theme="b"] .notice-bar { background: #F0E7D8; color: var(--ink); border-bottom: 1px solid var(--rule); }
body[data-theme="b"] .notice-bar strong { color: var(--jade); }
body[data-theme="c"] .notice-bar { background: var(--signal); color: #fff; border-bottom: 3px solid #23262B; }
body[data-theme="c"] .notice-bar strong { color: #fff; }

.hero-orphan { background: var(--hero-bg); color: var(--hero-fg); padding: clamp(2.2rem,5.5vw,3.6rem) 0 clamp(2rem,4.5vw,3rem); position: relative; overflow: hidden; }
body[data-theme="b"] .hero-orphan { background: var(--paper); color: var(--ink); border-bottom: 2px solid var(--ink); }
.hero-orphan h1 { color: inherit; max-width: 22ch; font-size: clamp(1.9rem,4.6vw,3rem); }
.hero-orphan h1 em { font-style: normal; color: var(--signal); }
body[data-theme="b"] .hero-orphan h1 em { color: var(--jade); }
.hero-orphan .sub { color: rgba(247,240,229,.85); font-size: clamp(1rem,2.1vw,1.12rem); max-width: 48ch; }
body[data-theme="b"] .hero-orphan .sub { color: var(--slate); }
body[data-theme="c"] .hero-orphan { border-bottom: 6px solid var(--signal); }
.hero-orphan .eyebrow { color: var(--signal); }
/* 深色首屏內的次要按鈕需反色 */
body[data-theme] .hero-orphan .btn.ghost {
  color: inherit; border-color: currentColor; box-shadow: none;
}
body[data-theme] .hero-orphan .btn.ghost:hover { color: inherit; transform: none; }
body[data-theme="b"] .hero-orphan .btn.ghost { border-color: var(--ink); color: var(--ink); }

body[data-theme="b"] .hero-orphan .eyebrow { color: var(--jade); }

.status-card { background: var(--panel); color: var(--ink); border: 2px solid var(--ink); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-strong); }
.status-card h3 { font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); margin-bottom: .9rem; font-family: var(--f-num); }
.status-item { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .7rem 0; border-top: 1px dashed var(--rule); }
.status-item:first-of-type { border-top: 0; }
.status-item .mark {
  width: 1.7rem; height: 1.7rem; display: grid; place-items: center; flex: none;
  border: 2px solid var(--ink); background: var(--signal); color: var(--ink);
  font-weight: 900; font-size: .85rem; font-family: var(--f-num);
}
body[data-theme="b"] .status-item .mark { background: var(--jade); color: #fff; border-color: var(--jade); }
body[data-theme="c"] .status-item .mark { background: var(--signal); color: #fff; border-color: var(--ink); }
.status-item p { margin: 0; font-size: .95rem; line-height: 1.6; }
.status-item strong { display: block; margin-bottom: .1rem; }

.do-dont { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .do-dont { grid-template-columns: 1fr; } }
.dd { border: 2px solid var(--ink); background: var(--panel); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.dd h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin-bottom: .7rem; }
.dd h3 .tag { font-family: var(--f-num); font-size: .8rem; border: 2px solid var(--ink); padding: .05rem .45rem; }
.dd.do h3 .tag { background: var(--jade); color: #fff; }
.dd.dont h3 .tag { background: var(--signal); color: var(--ink); }
body[data-theme="b"] .dd.do h3 .tag { background: var(--jade); }
.dd ul { list-style: none; padding: 0; margin: 0; }
.dd li { padding: .45rem 0 .45rem 1.4rem; position: relative; border-bottom: 1px dashed var(--rule); font-size: .95rem; }
.dd li:last-child { border-bottom: 0; }
.dd li::before { position: absolute; left: 0; font-weight: 900; }
.dd.do li::before { content: "\2713"; color: var(--jade); }
.dd.dont li::before { content: "\2715"; color: var(--alert); }

.rail { border: 2px solid var(--ink); background: var(--panel); padding: .9rem 1rem; box-shadow: var(--shadow); }
.rail ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 0; padding: 0; align-items: center; }
.rail a { text-decoration: none; font-size: .88rem; font-weight: 700; color: var(--slate); display: inline-flex; align-items: center; gap: .4rem; }
.rail a .num { font-family: var(--f-num); font-size: .72rem; border: 1.5px solid var(--rule); padding: 0 .3rem; }
.rail a.on { color: var(--ink); }
.rail a.on .num { background: var(--ink); color: var(--signal); border-color: var(--ink); }
body[data-theme="b"] .rail a.on .num { background: var(--jade); color: #fff; border-color: var(--jade); }
body[data-theme="c"] .rail a.on .num { background: var(--signal); color: #fff; border-color: var(--signal); }
.rail a:hover { color: var(--jade); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 2px solid var(--ink); padding-top: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.pager a { text-decoration: none; font-weight: 800; font-size: .95rem; border: 2px solid var(--ink); padding: .5rem .9rem; background: var(--panel); color: var(--ink); box-shadow: 3px 3px 0 var(--rule); }
.pager a:hover { background: var(--jade); color: #fff; }
.pager .pos { font-family: var(--f-num); font-size: .82rem; color: var(--slate); }

.alert-box { border: 2px solid var(--ink); background: #FBEED6; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
body[data-theme="c"] .alert-box { background: #F8E6DE; border-color: var(--signal); box-shadow: 5px 5px 0 var(--signal); }
body[data-theme="b"] .alert-box { background: #F3E9D8; border-color: var(--rule); box-shadow: none; }
.alert-box h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.alert-box ol, .alert-box ul { margin: 0; padding-left: 1.3rem; }
.alert-box li { padding: .25rem 0; font-size: .95rem; }

.flow { counter-reset: f; display: grid; gap: 1rem; }
.flow-step { display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; align-items: start; }
.flow-step .no {
  counter-increment: f; width: 3.2rem; height: 3.2rem; display: grid; place-items: center;
  background: var(--ink); color: var(--signal); font-family: var(--f-num); font-weight: 700; font-size: 1.05rem;
}
.flow-step .no::before { content: counter(f); }
body[data-theme="b"] .flow-step .no { background: var(--jade); color: #fff; border-radius: 50%; }
body[data-theme="c"] .flow-step .no { background: var(--signal); color: #fff; border-color: #fff; }
.flow-step h3 { margin-bottom: .25rem; font-size: 1.02rem; }
.flow-step p { margin: 0; color: var(--slate); font-size: .95rem; }

.checkline { display: flex; gap: .7rem; align-items: flex-start; padding: .5rem 0; border-bottom: 1px dashed var(--rule); }
.checkline input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-top: .25rem; flex: none; accent-color: var(--jade); }
.tickbox { width: 1.05rem; height: 1.05rem; border: 2px solid var(--ink); background: #fff; flex: none; margin-top: .2rem; display: inline-block; }
.checkline label { font-size: .97rem; }

.filetile { display: block; text-decoration: none; color: inherit; border: 2px solid var(--ink); background: var(--panel); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.filetile:hover { color: var(--ink); box-shadow: var(--shadow-strong); }
.filetile .ft { font-family: var(--f-num); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.filetile h3 { font-size: 1rem; margin: .25rem 0 .3rem; }
.filetile p { margin: 0; font-size: .88rem; color: var(--slate); }

.q-block { border: 2px solid var(--ink); background: var(--panel); padding: 1.1rem 1.2rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.q-block legend { font-weight: 800; font-size: .98rem; padding: 0 .4rem; }
.q-opts { display: grid; gap: .35rem; }
.q-opts label { display: flex; gap: .5rem; align-items: center; font-weight: 500; font-size: .95rem; padding: .18rem 0; }
.q-opts input { accent-color: var(--jade); }

.result-panel { border: 2px solid var(--ink); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-strong); background: var(--panel); }
.result-panel .verdict-tag { font-family: var(--f-num); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; border: 1.5px solid var(--ink); padding: .1rem .5rem; display: inline-block; margin-bottom: .6rem; }
.result-panel.ok { background: #F2EDE2; }
.result-panel.warn { background: #FFF6E5; }
.result-panel.urgent { background: #FDECE8; }
.result-panel h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.result-panel ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.result-panel li { padding: .2rem 0; font-size: .95rem; }

.consent { border: 2px solid var(--ink); background: var(--panel); padding: 1rem 1.1rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.consent .ch { display: flex; gap: .7rem; align-items: flex-start; }
.consent input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; accent-color: var(--jade); }
.consent label { font-size: .95rem; line-height: 1.6; }
.consent .why { font-size: .82rem; color: var(--slate); margin: .45rem 0 0 1.85rem; }
.req { color: var(--alert); font-weight: 700; }

.field-note { font-size: .85rem; color: var(--slate); margin-top: .3rem; line-height: 1.55; }
.warn-inline { display: none; margin-top: .4rem; background: #FDECE8; border-left: 4px solid var(--alert); padding: .55rem .7rem; font-size: .85rem; color: #7a2018; }
.warn-inline.on { display: block; }

@media print {
  .no-print, .site-head, .site-foot, .pager, .rail { display: none !important; }
  body[data-theme] { background: #fff; }
  .q-block, .checkline { box-shadow: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
