/**
 * Design reminder — 帳務工作紙：以米白紙張、深墨文字與赭紅核對線建立可掃讀工作表。
 * 所有樣式均限縮於 .rwc-root，避免影響 WordPress 主題與其他外掛。
 */
.rwc-root {
  --rwc-paper: #fffdf8;
  --rwc-warm: #f5f0e6;
  --rwc-ink: #17324d;
  --rwc-muted: #60717d;
  --rwc-line: #d6c9b4;
  --rwc-red: #b94e3c;
  --rwc-pale-red: #fbefea;
  --rwc-pale-green: #eef2ee;
  color: var(--rwc-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.rwc-root * { box-sizing: border-box; }
.rwc-root button, .rwc-root input, .rwc-root select { font: inherit; }
.rwc-root button { cursor: pointer; }
.rwc-app { max-width: 1400px; margin: 0 auto; background: var(--rwc-warm); padding: clamp(16px, 3vw, 36px); }
.rwc-header { position: relative; overflow: hidden; display: flex; gap: 20px; align-items: end; justify-content: space-between; border: 1px solid #c6b79f; border-left: 7px solid var(--rwc-red); background: #eee6d6; padding: clamp(20px, 3vw, 34px); box-shadow: 10px 12px 0 rgb(23 50 77 / 5%); }
.rwc-header::before { position: absolute; inset: 0; content: ""; opacity: .42; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgb(23 50 77 / .11) 28px), repeating-linear-gradient(to right, transparent 0, transparent 107px, rgb(23 50 77 / .05) 108px); }
.rwc-header > * { position: relative; }
.rwc-kicker { margin: 0; color: #527084; font-size: 11px; font-weight: 800; letter-spacing: .13em; line-height: 1.2; }
.rwc-title { margin: 8px 0 0; color: #102a43; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.rwc-subtitle { max-width: 700px; margin: 12px 0 0; color: #466071; font-size: 14px; line-height: 1.8; }
.rwc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rwc-button { border: 1px solid #163b59; border-radius: 0; background: #163b59; color: #fffdf8; padding: 10px 14px; font-size: 14px; font-weight: 800; transition: transform 160ms cubic-bezier(.23,1,.32,1), background-color 160ms cubic-bezier(.23,1,.32,1); }
.rwc-button:hover { background: #102f4a; color: #fffdf8; }
.rwc-button:active { transform: scale(.97); }
.rwc-button--secondary { background: #fffdf8; color: #163b59; }
.rwc-button--secondary:hover { background: #fff; color: #102f4a; }
.rwc-layout { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.rwc-sidebar, .rwc-sheet { border: 1px solid var(--rwc-line); background: var(--rwc-paper); }
.rwc-sidebar { box-shadow: 7px 7px 0 rgb(185 78 60 / 6%); }
.rwc-sheet { box-shadow: 8px 8px 0 rgb(23 50 77 / 5%); }
.rwc-setting-head, .rwc-sheet-head { border-bottom: 1px solid var(--rwc-line); padding: 22px; }
.rwc-setting-head { min-height: 140px; background: linear-gradient(145deg, #fbf8ef 65%, #f0e8d8 65%); }
.rwc-heading { margin: 8px 0 0; color: var(--rwc-ink); font-family: Georgia, "Noto Serif TC", serif; font-size: 24px; font-weight: 800; line-height: 1.2; }
.rwc-help { margin: 8px 0 0; color: var(--rwc-muted); font-size: 12px; line-height: 1.65; }
.rwc-setting-body { display: grid; gap: 18px; padding: 22px; }
.rwc-label { display: grid; gap: 7px; min-width: 0; color: #527084; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.rwc-label input, .rwc-label select { width: 100%; min-height: 40px; border: 1px solid #cdbfa9; border-radius: 0; background: var(--rwc-paper); color: #20394f; padding: 8px 10px; outline: none; }
.rwc-label input:focus, .rwc-label select:focus { border-color: var(--rwc-red); box-shadow: inset 3px 0 var(--rwc-red); }
.rwc-input-suffix { display: flex; overflow: hidden; min-height: 40px; border: 1px solid #cdbfa9; background: var(--rwc-paper); }
.rwc-input-suffix:focus-within { border-color: var(--rwc-red); box-shadow: inset 3px 0 var(--rwc-red); }
.rwc-input-suffix input { min-width: 0; flex: 1; border: 0; box-shadow: none !important; }
.rwc-input-suffix b { display: grid; place-items: center; border-left: 1px solid var(--rwc-line); padding: 0 10px; color: var(--rwc-muted); font-size: 12px; }
.rwc-disclosure { border-top: 1px solid var(--rwc-line); padding-top: 16px; }
.rwc-disclosure > summary { color: #234b63; cursor: pointer; font-size: 14px; font-weight: 800; }
.rwc-disclosure p { margin: 10px 0 0; border-left: 2px solid var(--rwc-red); padding-left: 10px; color: #526977; font-size: 12px; line-height: 1.65; }
.rwc-error { margin: 0; border-left: 2px solid var(--rwc-red); background: var(--rwc-pale-red); padding: 9px 10px; color: #8d3324; font-size: 12px; line-height: 1.5; }
.rwc-summary { border-top: 1px solid var(--rwc-line); background: #f0e8d8; padding: 22px; }
.rwc-summary-list { display: grid; gap: 11px; margin-top: 15px; }
.rwc-summary-row { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; color: #526977; font-size: 12px; }
.rwc-summary-row b { color: var(--rwc-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.rwc-summary-row--accent b { color: var(--rwc-red); }
.rwc-summary-row--total { margin-top: 2px; border-top: 1px solid #c6b79f; padding-top: 11px; color: var(--rwc-ink); font-size: 14px; font-weight: 800; }
.rwc-summary-row--total b { font-size: 17px; }
.rwc-sheet-head { display: flex; gap: 20px; align-items: end; justify-content: space-between; }
.rwc-row { display: grid; gap: 20px; padding: clamp(18px, 3vw, 28px); background-image: linear-gradient(to bottom, transparent 31px, rgb(222 212 194 / 26%) 32px); background-size: 100% 32px; }
.rwc-row + .rwc-row { border-top: 1px solid #ded4c2; }
.rwc-row-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.rwc-row-actions { display: flex; gap: 6px; align-items: center; }
.rwc-row-meta { display: flex; gap: 12px; align-items: center; }
.rwc-num { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid var(--rwc-red); color: var(--rwc-red); font-family: Georgia, "Noto Serif TC", serif; font-size: 13px; font-weight: 800; }
.rwc-company-title { margin: 3px 0 0; color: var(--rwc-ink); font-family: Georgia, "Noto Serif TC", serif; font-size: 20px; font-weight: 800; line-height: 1.2; }
.rwc-delete { width: 36px; height: 36px; border: 1px solid transparent; border-radius: 0; background: transparent; color: #9e3b2e; font-size: 20px; line-height: 1; }
.rwc-delete:hover { border-color: #e3b4a9; background: var(--rwc-pale-red); }
.rwc-copy { min-height: 32px; border: 1px solid #a7b5b6; border-radius: 0; background: #fffdf8; color: #234b63; padding: 6px 8px; font-size: 12px; font-weight: 800; }
.rwc-copy:hover { background: #edf2ef; }
.rwc-grid { display: grid; grid-template-columns: minmax(15rem, 1.55fr) minmax(10rem, .82fr) minmax(12rem, 1fr) minmax(11rem, .9fr); gap: 14px; }
.rwc-calculation { display: grid; grid-template-columns: minmax(21rem, 1fr) minmax(0, 1.35fr); gap: 20px; }
.rwc-input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rwc-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--rwc-line); background: var(--rwc-line); align-self: end; }
.rwc-result { min-width: 0; background: #fbf8ef; padding: 11px 12px; }
.rwc-result--primary { background: var(--rwc-pale-green); }
.rwc-result--annual { background: #f5f0e6; }
.rwc-result--annual span, .rwc-result--annual b { color: #7d3328; }
.rwc-result span { display: block; overflow: hidden; color: var(--rwc-muted); font-size: 11px; font-weight: 800; letter-spacing: .03em; text-overflow: ellipsis; white-space: nowrap; }
.rwc-result b { display: block; overflow: hidden; margin-top: 4px; color: #26435a; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.rwc-result--primary b { color: var(--rwc-ink); }
.rwc-row-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px dashed #d8cbb6; padding-top: 15px; }
.rwc-note { display: flex; gap: 10px; flex: 1; align-items: baseline; min-width: 0; color: var(--rwc-muted); font-size: 12px; font-weight: 800; }
.rwc-note input { width: min(100%, 420px); min-width: 0; border: 0; border-bottom: 1px solid #cdbfa9; border-radius: 0; background: transparent; color: #20394f; padding: 5px 2px; font-size: 14px; font-weight: 400; outline: none; }
.rwc-note input:focus { border-color: var(--rwc-red); }
.rwc-status { flex: none; border: 1px solid; padding: 4px 8px; font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.rwc-status--on { border-color: var(--rwc-red); background: var(--rwc-pale-red); color: #983a2b; }
.rwc-status--off { border-color: #acb8af; background: #f3f4ed; color: #587068; }
.rwc-sheet-foot { display: flex; gap: 16px; align-items: center; justify-content: space-between; border-top: 1px solid var(--rwc-line); background: #f8f3e9; padding: 20px 22px; }
.rwc-sheet-foot p { margin: 0; color: #536d7f; font-size: 14px; line-height: 1.6; }
.rwc-sheet-foot p b { color: var(--rwc-ink); }
.rwc-foot { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; border-top: 1px solid #cbbda7; padding-top: 17px; color: var(--rwc-muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 1000px) { .rwc-layout { grid-template-columns: 1fr; } .rwc-header { align-items: start; flex-direction: column; } }
@media (max-width: 980px) { .rwc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rwc-calculation { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .rwc-grid, .rwc-calculation { grid-template-columns: 1fr; } .rwc-results { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rwc-sheet-head, .rwc-sheet-foot, .rwc-foot { align-items: start; flex-direction: column; } }
@media (max-width: 420px) { .rwc-results { grid-template-columns: 1fr; } .rwc-input-grid { grid-template-columns: 1fr; } .rwc-row-head { align-items: start; flex-direction: column; } .rwc-row-actions { width: 100%; justify-content: flex-end; } .rwc-row-foot { align-items: start; flex-direction: column; } .rwc-note { width: 100%; flex-direction: column; gap: 2px; align-items: stretch; } }
@media (prefers-reduced-motion: no-preference) { .rwc-row { animation: rwc-enter 220ms cubic-bezier(.23,1,.32,1) both; } @keyframes rwc-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } } }
