/* Castle Honor (v0.23): the side tower's honor panel, the faucet's "gate barred" note, the Profile's honor line.
   The panel takes the colour of its state: gold while the reward is whole, amber once it's halved, red when barred. */

.honor{display:flex;flex-direction:column;gap:10px;--hon:var(--gold);--hon-hi:var(--gold-hi)}
.honor[data-state="halved"]{--hon:var(--warn);--hon-hi:color-mix(in srgb,var(--warn) 70%,white)}
.honor[data-state="locked"]{--hon:#e0614e;--hon-hi:#f08a78;border-color:color-mix(in srgb,#e0614e 55%,var(--line))}
:root[data-theme="light"] .honor[data-state="locked"]{--hon:#b3261e;--hon-hi:#b3261e}
:root[data-theme="light"] .honor[data-state="halved"]{--hon-hi:var(--warn)}
.honor .rowbetween{align-items:center}
.honor h3{display:flex;align-items:center;gap:8px}
.honor-glyph{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* the percentage, big and in the state's colour */
.honor-pct{font-family:var(--mono);font-variant-numeric:tabular-nums;font-size:1.15rem;color:var(--hon-hi);line-height:1}

/* v0.23.1: the percentage and a small (?) to the FAQ's Castle Honor answer, together in the top right corner */
.honor-top{display:flex;align-items:center;gap:8px}
.honor-help{flex:none;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;border:1px solid var(--line);
  font-family:var(--mono);font-size:.74rem;line-height:1;color:var(--muted);text-decoration:none;transition:color .15s,border-color .15s,background-color .15s}
.honor-help:hover,.honor-help:focus-visible{color:var(--gold-hi);border-color:var(--gold);background:var(--surface-2)}
:root[data-theme="light"] .honor-help:hover,:root[data-theme="light"] .honor-help:focus-visible{color:var(--gold)}
.honor-lock p a{color:var(--gold);white-space:nowrap}

/* the bar, with a notch where the reward halves */
.honor-meter{position:relative;height:12px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);overflow:visible}
.honor-meter i{display:block;height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,var(--hon),var(--hon-hi));transition:width .6s,background .6s}
.honor-mark{position:absolute;top:-4px;bottom:-4px;width:2px;margin-left:-1px;background:var(--ink);opacity:.45;border-radius:1px;cursor:help}
/* v1.43: the second notch, where the Heralds' Board locks: dashed, so the two lines read apart */
.honor-mark-ptc{background:none;border-left:2px dotted var(--ink);width:0;margin-left:-1px}
.honor[data-ptc="locked"] .honor-mark-ptc{border-left-color:var(--hon-hi);opacity:.9}
.honor-scale{display:flex;justify-content:space-between;font-size:.66rem;letter-spacing:.1em;color:var(--muted);margin-top:-4px}
/* v1.43: with four numbers (0 · 25 · 50 · 100) each one sits under its own notch */
.honor-scale.honor-scale-abs{display:block;position:relative;height:1.1em}
.honor-scale-abs span{position:absolute;top:0;transform:translateX(-50%)}
.honor-scale-abs span:first-child{transform:none}
.honor-scale-abs span:last-child{transform:translateX(-100%)}

.honor-state{margin:0;font-size:.88rem;line-height:1.45;color:var(--muted)}
.honor[data-state="locked"] .honor-state,.honor[data-state="halved"] .honor-state{color:var(--ink)}

/* what moves it: two small chips */
.honor-rules{list-style:none;margin:0;padding:8px 0 0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:.78rem;color:var(--muted)}
.honor-rules li{display:flex;flex-direction:column;gap:1px}
.honor-rules b{font-family:var(--mono);font-weight:500;font-size:.92rem}
.honor-rules .down b{color:var(--warn)}
.honor-rules .up b{color:var(--ok)}
/* v1.30.1: an explicit line that offerwall PTC clicks count as offers */
.honor-note{margin:-4px 0 0;font-size:.76rem;line-height:1.4;color:var(--muted)}

.honor-go{display:flex;gap:8px}
.honor-go .btn{flex:1;text-align:center;white-space:nowrap}

/* the faucet's note when the gate is barred: takes the place of the icons */
.honor-lock{border:1px solid color-mix(in srgb,#e0614e 55%,var(--line));border-radius:8px;padding:14px;background:color-mix(in srgb,#e0614e 8%,var(--bg))}
:root[data-theme="light"] .honor-lock{border-color:color-mix(in srgb,#b3261e 45%,var(--line));background:color-mix(in srgb,#b3261e 6%,var(--bg))}
.honor-lock b{display:block;font-family:var(--display);font-weight:400;letter-spacing:.04em;font-size:1.02rem;margin-bottom:4px}
.honor-lock p{margin:0 0 10px;font-size:.92rem;color:var(--muted)}
.honor-lock .honor-go{max-width:360px}
@media (max-width:600px){.honor-lock .honor-go{margin-inline:auto}}

/* v1.43: the Heralds' Board's locked note (app.js, ptcLockNote): in place of the ad cards */
.ptc-lock{margin-top:12px;padding:16px 18px}
.ptc-lock b{display:flex;align-items:center;gap:8px;font-size:1.12rem;margin-bottom:8px;color:#f08a78}
:root[data-theme="light"] .ptc-lock b{color:#b3261e}
.ptc-lock p{color:var(--ink);line-height:1.5}
.ptc-lock p strong{font-family:var(--mono);font-weight:500;color:var(--gold-hi)}
:root[data-theme="light"] .ptc-lock p strong{color:var(--gold)}
.ptc-lock p a{font-weight:700}
.ptc-lock .ptc-lock-terms{margin:0;font-size:.84rem}
.ptc-lock .ptc-lock-terms a{font-weight:400;color:var(--muted);text-decoration:underline;text-underline-offset:2px}
.ptc-lock .ptc-lock-terms a:hover{color:var(--gold)}

/* the Profile's line */
#pHonor[data-state="halved"]{color:var(--warn)}
#pHonor[data-state="locked"]{color:#e0614e}
:root[data-theme="light"] #pHonor[data-state="locked"]{color:#b3261e}
