/* PBRP Penal Code. Uses the site's theme variables from style.css. */
body.penal { background: var(--bg); color: var(--text); min-height: 100vh; }
.pc-wrap { width: min(1000px, calc(100% - 32px)); margin: 0 auto; padding: 104px 0 60px; }

.pc-hero { text-align: center; padding: 18px 0 26px; border-bottom: 1px solid var(--line2); margin-bottom: 22px; }
.pc-kicker { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-light); margin: 0 0 6px; }
.pc-hero h1 { font-size: clamp(38px, 6vw, 64px); color: var(--bright); line-height: 1.05; margin: 0 0 10px; }
.pc-meta { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pc-btn { display: inline-block; padding: 10px 18px; background: transparent; color: var(--text); border: 1px solid var(--line2); border-radius: var(--r-sm); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; transition: border-color .2s, background .2s; }
.pc-btn:hover { border-color: var(--accent-light); background: var(--gold-dim); }
.pc-btn-main { background: var(--accent); color: #1a1408; border-color: var(--accent); font-weight: 600; }
.pc-btn-main:hover { background: var(--accent-light); }
.pc-small { padding: 8px 14px; font-size: 13px; }

.pc-tools { position: sticky; top: 72px; z-index: 5; background: rgba(23,26,22,.96); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 8px; }
.pc-search input { width: 100%; padding: 13px 16px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); border-radius: var(--r-sm); color: var(--bright); font: inherit; font-size: 16px; }
.pc-search input:focus { outline: none; border-color: var(--accent-light); box-shadow: 0 0 0 3px var(--accent-dim); }
.pc-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin-top: 12px; }
.pc-filters label { display: grid; gap: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pc-filters select { padding: 8px 10px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); border-radius: var(--r-sm); color: var(--bright); font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-chipbtn { padding: 8px 14px; background: transparent; border: 1px solid var(--line2); border-radius: var(--r-pill); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.pc-chipbtn:hover { border-color: var(--accent-light); }
.pc-chipbtn.on { background: var(--accent); border-color: var(--accent); color: #1a1408; font-weight: 600; }
.pc-count { margin: 12px 0 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--muted); }

.pc-group { margin: 30px 0 10px; padding-bottom: 8px; font-size: 22px; color: var(--gold); border-bottom: 1px solid var(--line2); }
.pc-list { margin-top: 14px; }
.pc-empty { text-align: center; color: var(--muted); padding: 40px 0; }

.pc-item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--r-md); margin-bottom: 10px; transition: border-color .2s, background .2s; scroll-margin-top: 220px; }
.pc-item.pc-citation { border-left-color: #9a9a73; }
.pc-item.pc-misdemeanor { border-left-color: var(--accent); }
.pc-item.pc-felony { border-left-color: var(--red); }
.pc-item[open] { background: var(--surface2); border-color: var(--accent-border); }
.pc-item.pc-flash { animation: pcflash 2.2s ease; }
@keyframes pcflash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent-light); } 100% { box-shadow: 0 0 0 0 transparent; } }
.pc-item summary { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.pc-item summary::-webkit-details-marker { display: none; }
.pc-item summary:hover .pc-title { color: var(--accent-light); }
.pc-item summary:focus-visible { outline: 2px solid var(--accent-light); outline-offset: -2px; }
.pc-code { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 14px; color: var(--gold-light); background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 0; text-align: center; white-space: nowrap; }
.pc-title { color: var(--bright); font-size: 18px; font-weight: 600; line-height: 1.3; }
.pc-title small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: .04em; }
.pc-chips-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pc-chip { padding: 3px 10px; border-radius: var(--r-pill); font-family: 'IBM Plex Mono', monospace; font-size: 12px; white-space: nowrap; border: 1px solid var(--line2); }
.pc-chip-jail { color: #e7b9a6; border-color: rgba(183,104,76,.5); background: var(--illegal-dim); }
.pc-chip-fine { color: var(--gold-light); border-color: var(--accent-border); background: var(--gold-dim); }

.pc-body { padding: 4px 18px 18px 18px; border-top: 1px solid var(--line); }
.pc-body p { margin: 12px 0 0; line-height: 1.7; font-size: 15.5px; }
.pc-body ul { margin: 10px 0 0 22px; }
.pc-body li { line-height: 1.7; font-size: 15.5px; }
.pc-body table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14.5px; }
.pc-body th, .pc-body td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.pc-body th { background: rgba(0,0,0,.3); color: var(--accent-light); font-weight: 500; }
.pc-pun { margin-top: 16px; padding: 12px 16px; background: rgba(0,0,0,.28); border: 1px solid var(--line2); border-left: 3px solid var(--accent-light); border-radius: var(--r-sm); }
.pc-pun b { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-light); font-weight: 500; }
.pc-pun p { margin: 4px 0 0; color: var(--bright); }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pc-tag { padding: 2px 10px; font-size: 12px; border-radius: var(--r-sm); background: var(--illegal-dim); border: 1px solid rgba(183,104,76,.4); color: #e7b9a6; }
.pc-link { margin-top: 14px; padding: 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.pc-link:hover { color: var(--accent-light); }
mark { background: rgba(224,182,111,.35); color: var(--bright); border-radius: 2px; padding: 0 1px; }
.pc-disclaimer { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }

@media (max-width: 720px) {
  .pc-tools { position: static; }
  .pc-item summary { grid-template-columns: 70px minmax(0, 1fr); }
  .pc-chips-row { grid-column: 1 / -1; justify-content: flex-start; }
}
@media print {
  body.penal * { display: none !important; }
  body.penal::before { content: 'The Pinoy Best Penal Code cannot be printed. Visit the website to read it.'; display: block; font: 18px system-ui, sans-serif; color: #000; padding: 40px; }
}

/* Coat of arms watermark behind the whole page */
.pc-watermark { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: url('../assets/img/pbrp-crest-320.webp') center 54% / min(720px, 82vw) no-repeat; opacity: .075; filter: saturate(.85); }
.pc-wrap { position: relative; z-index: 1; }
.pc-item, .pc-tools { background-color: rgba(26, 30, 24, .78); }
.pc-item[open] { background-color: rgba(34, 39, 30, .86); }
/* the offense text cannot be selected (inputs still can) */
.pc-hero, .pc-list, .pc-disclaimer { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pc-btns { display: flex; flex-wrap: wrap; gap: 18px; }
.pc-body img, .pc-watermark { -webkit-user-drag: none; }

/* same title font as the main site */
.pc-hero h1 { font-family: 'PBRPFont', serif; font-weight: 400; letter-spacing: 1px; font-size: clamp(56px, 9vw, 112px); line-height: .95; }

/* Split banner: courthouse lobby on the left, courtroom on the right, title on top */
.pc-hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line2); border-radius: var(--r-md); padding: clamp(44px, 7vw, 84px) 20px clamp(34px, 5vw, 56px); }
.pc-split { position: absolute; inset: 0; z-index: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); }
.pc-split img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.95) brightness(.95); }
.pc-split::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(23, 26, 22, .62) 0%, rgba(23, 26, 22, .28) 55%, rgba(23, 26, 22, .12) 100%); pointer-events: none; }
.pc-hero h1, .pc-hero .pc-kicker, .pc-hero .pc-meta { text-shadow: 0 2px 14px rgba(0, 0, 0, .65); }
.pc-hero .pc-meta { color: var(--text); }
@media (max-width: 560px) { .pc-split img { object-position: center; } .pc-hero { padding: 40px 14px 30px; } }
