/* Ragnarok Project — "Night War Chronicle" design system.
   Shared by every page: tokens, header, footer, buttons, panels, gauges, home sections. Prefix: rp- */
:root {
  --rp-ink-0: #0b0907;
  --rp-ink-1: #120f0b;
  --rp-ink-2: #1b1610;
  --rp-ink-3: #261f17;
  --rp-line: rgba(201, 164, 92, 0.2);
  --rp-line-strong: rgba(201, 164, 92, 0.48);
  --rp-gold: #c9a45c;
  --rp-gold-hi: #ead197;
  --rp-parch: #efe2c4;
  --rp-parch-2: #cdbd9e;
  --rp-parch-3: #9d8e74;
  --rp-ember: #d4531c;
  --rp-ember-hi: #f2803a;
  --rp-ember-lo: #93330c;
  --rp-hp: #b3342b;
  --rp-mp: #3567b5;
  --rp-cp: #d6a128;
  --rp-xp: #7ea64a;
  --rp-display: 'Cinzel', 'Times New Roman', serif;
  --rp-body: 'Alegreya Sans', 'Segoe UI', sans-serif;
  --rp-header-h: 72px;
  --rp-wrap: min(1200px, 100% - 40px);
  --rp-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* style.css sets html, body { overflow: auto }, which turns <body> into its own scroll box (breaks sticky, scroll events). */
html { background: var(--rp-ink-0); scrollbar-color: #5c4a2f var(--rp-ink-1); overflow: visible; }
body.rp {
  margin: 0;
  background: var(--rp-ink-0);
  color: var(--rp-parch);
  font-family: var(--rp-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--rp-header-h);
}
body.rp.rp-home { padding-top: 0; }
body.rp ::selection { background: rgba(212, 83, 28, 0.55); color: #fff; }
body.rp ::-webkit-scrollbar { width: 12px; height: 12px; }
body.rp ::-webkit-scrollbar-track { background: var(--rp-ink-1); border-radius: 0; }
body.rp ::-webkit-scrollbar-thumb { background: #5c4a2f; border: 3px solid var(--rp-ink-1); border-radius: 8px; }
body.rp ::-webkit-scrollbar-thumb:hover { background: var(--rp-gold); }
body.rp a { color: var(--rp-gold-hi); text-underline-offset: 3px; }
/* style.css forces Lora on every p; the new body face wins everywhere. */
body.rp p, body.rp li, body.rp input, body.rp button, body.rp select, body.rp textarea { font-family: var(--rp-body); }
body.rp :focus-visible { outline: 2px solid var(--rp-gold-hi); outline-offset: 3px; }
.rp-wrap { width: var(--rp-wrap); margin-inline: auto; }
.rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.rp-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9000;
  height: var(--rp-header-h);
  background: linear-gradient(180deg, rgba(11, 9, 7, 0.96), rgba(11, 9, 7, 0.86));
  border-bottom: 1px solid var(--rp-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}
.rp-home .rp-header:not(.is-solid) { background: linear-gradient(180deg, rgba(11, 9, 7, 0.85), rgba(11, 9, 7, 0)); border-bottom-color: transparent; box-shadow: none; backdrop-filter: none; }
.rp-header-in { display: flex; align-items: center; gap: 28px; height: 100%; width: min(1320px, 100% - 40px); margin-inline: auto; }
.rp-brand { display: flex; align-items: center; flex: none; }
.rp-brand img { height: 40px; width: auto; display: block; }
.rp-nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.rp-nav a {
  position: relative;
  padding: 10px 14px;
  color: var(--rp-parch-2);
  font-family: var(--rp-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}
.rp-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px; background: var(--rp-ember-hi); transform: scaleX(0); transition: transform 0.35s var(--rp-ease); }
.rp-nav a:hover, .rp-nav a[aria-current="page"] { color: var(--rp-parch); }
.rp-nav a:hover::after, .rp-nav a[aria-current="page"]::after { transform: scaleX(1); }
.rp-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.rp-lang { position: relative; }
.rp-lang summary { list-style: none; cursor: pointer; padding: 8px 10px; color: var(--rp-parch-2); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid transparent; border-radius: 4px; display: flex; align-items: center; gap: 6px; }
.rp-lang summary::-webkit-details-marker { display: none; }
.rp-lang summary:hover, .rp-lang[open] summary { border-color: var(--rp-line); color: var(--rp-parch); }
.rp-lang summary svg { width: 16px; height: 16px; }
.rp-lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px; padding: 6px; background: var(--rp-ink-2); border: 1px solid var(--rp-line-strong); border-radius: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); }
.rp-lang-menu a { display: block; padding: 8px 10px; border-radius: 4px; color: var(--rp-parch-2); text-decoration: none; font-size: 0.92rem; }
.rp-lang-menu a:hover, .rp-lang-menu a[aria-current="true"] { background: var(--rp-ink-3); color: var(--rp-parch); }
.rp-burger { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--rp-line); border-radius: 6px; background: transparent; color: var(--rp-parch); cursor: pointer; }
.rp-burger svg { width: 22px; height: 22px; display: block; margin: auto; }

/* ---------- Buttons ---------- */
.rp-btn {
  --rp-btn-pad: 12px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--rp-btn-pad);
  border-radius: 3px;
  font-family: var(--rp-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s var(--rp-ease), box-shadow 0.3s, background 0.3s, color 0.2s, border-color 0.2s;
}
body.rp .rp-btn--primary {
  color: #fff6e6;
  background: linear-gradient(180deg, var(--rp-ember-hi) 0%, var(--rp-ember) 48%, var(--rp-ember-lo) 100%);
  border: 1px solid #f6b46f;
  box-shadow: inset 0 1px 0 rgba(255, 228, 190, 0.55), inset 0 -2px 0 rgba(60, 18, 2, 0.5), 0 8px 22px rgba(212, 83, 28, 0.35);
  text-shadow: 0 1px 1px rgba(60, 18, 2, 0.6);
}
body.rp .rp-btn--primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 228, 190, 0.7), inset 0 -2px 0 rgba(60, 18, 2, 0.5), 0 12px 30px rgba(242, 128, 58, 0.45); }
body.rp .rp-btn--ghost { color: var(--rp-gold-hi); background: rgba(11, 9, 7, 0.45); border: 1px solid var(--rp-line-strong); }
body.rp .rp-btn--ghost:hover { color: var(--rp-parch); border-color: var(--rp-gold-hi); background: rgba(201, 164, 92, 0.1); }
.rp-btn--sm { --rp-btn-pad: 9px 16px; font-size: 0.78rem; }
.rp-btn--lg { --rp-btn-pad: 16px 34px; font-size: 0.98rem; }
.rp-btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Game-window panel ---------- */
.rp-window {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 24, 17, 0.94), rgba(16, 13, 10, 0.96));
  border: 1px solid var(--rp-line-strong);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.07), 0 18px 40px rgba(0, 0, 0, 0.55);
}
.rp-window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--rp-line);
  background: linear-gradient(180deg, rgba(201, 164, 92, 0.16), rgba(201, 164, 92, 0.03));
  color: var(--rp-gold-hi);
  font-family: var(--rp-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rp-window-body { padding: 18px 18px 16px; }

/* ---------- Gauges (CP / HP / MP language) ---------- */
.rp-gauges { display: grid; gap: 11px; }
.rp-gauge { display: grid; grid-template-columns: 74px minmax(0, 1fr) 48px; align-items: center; gap: 12px; }
.rp-gauge-label { color: var(--rp-parch-2); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rp-gauge-track { position: relative; height: 12px; border: 1px solid rgba(0, 0, 0, 0.9); border-radius: 2px; background: #070605; box-shadow: 0 0 0 1px rgba(201, 164, 92, 0.22); overflow: hidden; }
.rp-gauge-fill { position: absolute; inset: 0 auto 0 0; width: var(--rp-fill, 50%); background: linear-gradient(180deg, color-mix(in srgb, var(--rp-g) 70%, #fff) 0%, var(--rp-g) 45%, color-mix(in srgb, var(--rp-g) 62%, #000) 100%); transform-origin: left; }
.rp-gauge-value { color: var(--rp-parch); font-family: var(--rp-display); font-size: 1.02rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.rp-gauge--xp { --rp-g: var(--rp-xp); }
.rp-gauge--sp { --rp-g: var(--rp-mp); }
.rp-gauge--adena { --rp-g: var(--rp-cp); }
.rp-gauge--drop { --rp-g: var(--rp-hp); }
.rp-gauge--spoil { --rp-g: #8a5ab8; }

/* ---------- Hero (home) ---------- */
.rp-hero { position: relative; min-height: max(640px, 100svh); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
/* The painting is mirrored so the hero figure stands right of the copy. */
.rp-hero-art { position: absolute; inset: 0; z-index: -2; background: var(--rp-hero-img) no-repeat 30% 22% / cover; transform: scaleX(-1); filter: saturate(1.08) contrast(1.05); }
.rp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
    linear-gradient(90deg, rgba(11, 9, 7, 0.97) 0%, rgba(11, 9, 7, 0.88) 30%, rgba(11, 9, 7, 0.35) 62%, rgba(11, 9, 7, 0.15) 100%),
    linear-gradient(0deg, var(--rp-ink-0) 0%, rgba(11, 9, 7, 0) 38%),
    radial-gradient(120% 80% at 70% 40%, rgba(0, 0, 0, 0) 40%, rgba(11, 9, 7, 0.65) 100%); }
.rp-hero-in { width: min(1320px, 100% - 40px); margin-inline: auto; padding: calc(var(--rp-header-h) + 40px) 0 120px; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: end; gap: 40px; }
.rp-hero-logo { width: min(476px, 100%); height: auto; display: block; margin: 0 0 18px -6px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7)); }
.rp-hero-chronicle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; color: var(--rp-gold-hi); font-family: var(--rp-display); font-size: 1rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.rp-hero-chronicle i { width: 5px; height: 5px; transform: rotate(45deg); background: var(--rp-ember-hi); display: inline-block; }
.rp-hero-pitch { max-width: 34em; margin: 0 0 30px; color: var(--rp-parch-2); font-size: 1.18rem; line-height: 1.6; }
.rp-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.rp-hero-side { align-self: end; justify-self: end; width: min(400px, 100%); }
.rp-hero-side .rp-window-title span:last-child { color: var(--rp-parch-3); font-family: var(--rp-body); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.rp-scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: var(--rp-parch-3); }
.rp-scroll-cue svg { width: 26px; height: 26px; display: block; animation: rp-bob 2.4s var(--rp-ease) infinite; }

/* One authored moment: the brush logo is painted on, left to right. */
@keyframes rp-brush { from { clip-path: inset(0 100% 0 0); opacity: 0.4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes rp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.rp-hero-logo { animation: rp-brush 1.4s var(--rp-ease) 0.15s both; }
.rp-hero-copy > :not(.rp-hero-logo) { animation: rp-rise 0.9s var(--rp-ease) both; animation-delay: 0.9s; }
.rp-hero-side { animation: rp-rise 0.9s var(--rp-ease) 1.1s both; }

/* ---------- Sections ---------- */
.rp-section { padding: 96px 0; position: relative; }
.rp-section + .rp-section { padding-top: 24px; }
.rp-h2 { margin: 0 0 12px; color: var(--rp-parch); font-family: var(--rp-display); font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700; line-height: 1.15; letter-spacing: 0.02em; text-wrap: balance; }
.rp-lead { max-width: 60ch; margin: 0 0 40px; color: var(--rp-parch-2); font-size: 1.08rem; }
.rp-divider { display: block; width: 180px; height: 12px; margin: 0 0 22px; color: var(--rp-gold); }
.rp-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.rp-section-head .rp-lead { margin-bottom: 0; }

/* Highlights: an in-game quest list, not a card grid */
.rp-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 1px solid var(--rp-line); }
.rp-hl { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--rp-line); color: inherit; text-decoration: none; transition: background 0.3s; }
.rp-hl:hover { background: linear-gradient(90deg, rgba(201, 164, 92, 0.08), rgba(201, 164, 92, 0)); }
.rp-slot { width: 50px; height: 50px; padding: 4px; border-radius: 3px; background: linear-gradient(180deg, #2b2319, #110d09); border: 1px solid var(--rp-line-strong); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), 0 4px 10px rgba(0, 0, 0, 0.5); }
.rp-slot img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 2px; }
.rp-hl-title { display: flex; align-items: center; gap: 10px; margin: 0 0 3px; color: var(--rp-gold-hi); font-family: var(--rp-display); font-size: 1.04rem; font-weight: 700; letter-spacing: 0.02em; }
.rp-hl-text { margin: 0; color: var(--rp-parch-2); font-size: 0.96rem; line-height: 1.5; }
.rp-tag { flex: none; padding: 2px 8px; border-radius: 99px; font-family: var(--rp-body); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rp-tag--new { background: var(--rp-ember); color: #fff3e3; }
.rp-tag--soon { border: 1px solid #8cc3e0; color: #a9d4ea; }
.rp-hl-go { color: var(--rp-parch-3); transition: transform 0.3s var(--rp-ease), color 0.2s; }
.rp-hl:hover .rp-hl-go { transform: translateX(4px); color: var(--rp-ember-hi); }
.rp-hl-go svg { width: 20px; height: 20px; display: block; }

/* Start in three steps: a road, the sequence matters */
.rp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: rp-step; position: relative; }
.rp-steps::before { content: ""; position: absolute; top: 31px; left: 32px; right: 32px; height: 1px; background: linear-gradient(90deg, var(--rp-ember), var(--rp-line-strong) 60%, var(--rp-line)); }
.rp-step { position: relative; }
.rp-step-num { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px; background: var(--rp-ink-0); border: 1px solid var(--rp-line-strong); transform: rotate(45deg); }
.rp-step-num span { transform: rotate(-45deg); color: var(--rp-gold-hi); font-family: var(--rp-display); font-size: 1.45rem; font-weight: 700; }
.rp-step:first-child .rp-step-num { border-color: var(--rp-ember-hi); box-shadow: 0 0 0 4px rgba(212, 83, 28, 0.15); }
.rp-step h3 { margin: 0 0 8px; color: var(--rp-parch); font-family: var(--rp-display); font-size: 1.25rem; font-weight: 700; }
.rp-step p { margin: 0 0 18px; color: var(--rp-parch-2); max-width: 34ch; }

/* News */
.rp-news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rp-news-item { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.rp-news-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rp-line); border-radius: 3px; margin-bottom: 14px; }
.rp-news-item time { color: var(--rp-parch-3); font-size: 0.85rem; }
.rp-news-item h3 { margin: 4px 0 6px; color: var(--rp-gold-hi); font-family: var(--rp-display); font-size: 1.12rem; }
.rp-news-item p { margin: 0; color: var(--rp-parch-2); font-size: 0.96rem; }
.rp-band { position: relative; overflow: hidden; isolation: isolate; border: 1px solid var(--rp-line); border-radius: 4px; padding: 56px 48px; }
.rp-band-art { position: absolute; inset: 0; z-index: -2; background: var(--rp-band-img) no-repeat 70% 35% / cover; }
.rp-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 9, 7, 0.96) 0%, rgba(11, 9, 7, 0.82) 45%, rgba(11, 9, 7, 0.25) 100%); }
.rp-band .rp-h2 { max-width: 18ch; }
.rp-band .rp-lead { margin-bottom: 26px; }
.rp-band-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.rp-footer { margin-top: 40px; border-top: 1px solid var(--rp-line); background: linear-gradient(180deg, var(--rp-ink-1), #070605); color: var(--rp-parch-2); }
.rp-footer-in { width: var(--rp-wrap); margin-inline: auto; padding: 56px 0 28px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.rp-footer-brand img { width: 200px; height: auto; display: block; margin-bottom: 14px; }
.rp-footer-brand p { margin: 0 0 18px; max-width: 32ch; font-size: 0.95rem; }
.rp-social { display: flex; gap: 8px; }
.rp-social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--rp-line); border-radius: 4px; color: var(--rp-parch-2); text-decoration: none; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.rp-social a:hover { color: var(--rp-parch); border-color: var(--rp-gold); background: rgba(201, 164, 92, 0.08); }
.rp-social svg { width: 18px; height: 18px; }
.rp-footer h4 { margin: 4px 0 14px; color: var(--rp-gold-hi); font-family: var(--rp-display); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.rp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rp-footer ul a { color: var(--rp-parch-2); text-decoration: none; font-size: 0.95rem; }
.rp-footer ul a:hover { color: var(--rp-parch); text-decoration: underline; }
.rp-vote { width: var(--rp-wrap); margin-inline: auto; padding: 22px 0; border-top: 1px solid var(--rp-line); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; }
.rp-vote span { color: var(--rp-parch-3); font-family: var(--rp-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.rp-vote img { height: 44px; width: auto; display: block; opacity: 0.85; transition: opacity 0.2s; }
.rp-vote a:hover img { opacity: 1; }
.rp-legal { width: var(--rp-wrap); margin-inline: auto; padding: 18px 0 26px; border-top: 1px solid var(--rp-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--rp-parch-3); font-size: 0.85rem; }
.rp-legal p { margin: 0; }

/* ---------- Mobile drawer ---------- */
.rp-drawer { position: fixed; inset: 0; z-index: 9500; display: flex; flex-direction: column; padding: 18px 20px 28px; background: rgba(11, 9, 7, 0.98); overflow-y: auto; }
.rp-drawer[hidden] { display: none; }
.rp-drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.rp-drawer-top img { height: 36px; }
.rp-drawer nav { display: grid; }
.rp-drawer nav a { padding: 16px 4px; border-bottom: 1px solid var(--rp-line); color: var(--rp-parch); font-family: var(--rp-display); font-size: 1.15rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.rp-drawer-cta { display: grid; gap: 12px; margin-top: 28px; }
.rp-drawer-langs { display: flex; gap: 8px; margin-top: 22px; }
.rp-drawer-langs a { padding: 8px 14px; border: 1px solid var(--rp-line); border-radius: 4px; color: var(--rp-parch-2); text-decoration: none; text-transform: uppercase; font-size: 0.85rem; }
.rp-drawer-langs a[aria-current="true"] { border-color: var(--rp-gold); color: var(--rp-parch); }
body.rp-locked { overflow: hidden; }

/* ---------- Page hero (inner pages) ---------- */
.rp-page-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--rp-header-h) + 96px) 0 72px; min-height: 420px; display: flex; align-items: flex-end; }
.rp-page-hero-art { position: absolute; inset: 0; z-index: -2; background: var(--rp-hero-img) no-repeat var(--rp-hero-pos, 50% 30%) / cover; filter: saturate(1.08) contrast(1.05); }
.rp-page-hero-art.is-flipped { transform: scaleX(-1); }
.rp-page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
    linear-gradient(90deg, rgba(11, 9, 7, 0.96) 0%, rgba(11, 9, 7, 0.82) 34%, rgba(11, 9, 7, 0.25) 70%, rgba(11, 9, 7, 0.1) 100%),
    linear-gradient(0deg, var(--rp-ink-0) 0%, rgba(11, 9, 7, 0) 45%); }
.rp-page-hero h1 { margin: 0 0 12px; color: var(--rp-parch); font-family: var(--rp-display); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.08; letter-spacing: 0.01em; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); animation: rp-rise 0.9s var(--rp-ease) 0.1s both; }
.rp-page-hero p { max-width: 46ch; margin: 0; color: var(--rp-parch-2); font-size: 1.15rem; animation: rp-rise 0.9s var(--rp-ease) 0.25s both; }
.rp-page-hero .rp-hero-cta { margin-top: 26px; animation: rp-rise 0.9s var(--rp-ease) 0.4s both; }

/* ---------- Download: three steps, the launcher is the recommended last step ---------- */
.rp-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.rp-dl-card { display: flex; flex-direction: column; }
.rp-dl-card .rp-window-body { display: flex; flex-direction: column; flex: 1; padding: 24px 22px 22px; }
.rp-dl-card.is-rec { border-color: rgba(242, 128, 58, 0.6); box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.07), 0 0 0 1px rgba(242, 128, 58, 0.18), 0 18px 40px rgba(0, 0, 0, 0.55); }
.rp-dl-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 16px; color: var(--rp-gold-hi); border-radius: 3px; background: linear-gradient(180deg, #2b2319, #110d09); border: 1px solid var(--rp-line-strong); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8); }
.rp-dl-card.is-rec .rp-dl-icon { color: var(--rp-ember-hi); }
.rp-dl-icon svg { width: 32px; height: 32px; }
.rp-dl-card h3 { margin: 0; color: var(--rp-parch); font-family: var(--rp-display); font-size: 1.3rem; font-weight: 700; }
.rp-dl-meta { margin: 2px 0 12px; color: var(--rp-parch-3); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.rp-dl-text { margin: 0 0 20px; color: var(--rp-parch-2); flex: 1; }
.rp-mirrors { display: flex; flex-wrap: wrap; gap: 10px; }
.rp-badge-rec { display: inline-block; padding: 3px 10px; border-radius: 99px; background: rgba(126, 166, 74, 0.16); border: 1px solid rgba(126, 166, 74, 0.55); color: #b9d98f; font-family: var(--rp-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; }
.rp-note { margin-top: 28px; padding: 16px 20px; border: 1px solid var(--rp-line); border-radius: 4px; background: rgba(201, 164, 92, 0.05); color: var(--rp-parch-2); font-size: 0.97rem; }
.rp-note strong { color: var(--rp-parch); }

@media (max-width: 960px) {
  .rp-dl { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .rp-page-hero { padding: calc(var(--rp-header-h) + 150px) 0 40px; min-height: 0; }
  .rp-page-hero::before { background: linear-gradient(180deg, rgba(11, 9, 7, 0.35) 0%, rgba(11, 9, 7, 0.85) 55%, var(--rp-ink-0) 100%); }
  .rp-page-hero p { font-size: 1.02rem; }
  .rp-page-hero-art { background-position: var(--rp-hero-pos-m, var(--rp-hero-pos, 50% 30%)); }
  .rp-mirrors .rp-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-page-hero h1, .rp-page-hero p, .rp-page-hero .rp-hero-cta { animation: none !important; }
}

/* ---------- Account pages: login, register, password reset (existing Lin2Web markup) ---------- */
body.rp #auth { position: relative; isolation: isolate; min-height: calc(100svh - var(--rp-header-h)); display: flex; align-items: center; justify-content: center; padding: 56px 16px 72px; background: linear-gradient(180deg, rgba(11, 9, 7, 0.7), rgba(11, 9, 7, 0.92)), url('../img/news.jpg') 60% 30% / cover no-repeat; }
body.rp #auth .news-page { width: 100%; min-height: 0; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; }
body.rp #auth .auth-block { width: min(440px, 100%); margin: 0; padding: 0; background: none; display: block; }
body.rp #auth .register-block { width: 100%; margin: 0; padding: 34px 30px 26px; border: 1px solid var(--rp-line-strong); border-radius: 4px; background: linear-gradient(180deg, rgba(30, 24, 17, 0.96), rgba(16, 13, 10, 0.97)); box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.07), 0 24px 60px rgba(0, 0, 0, 0.6); color: var(--rp-parch-2); }
body.rp #auth h3 { margin: 0 0 24px; color: var(--rp-parch); font-family: var(--rp-display); font-size: 1.8rem; font-weight: 700; text-align: center; letter-spacing: 0.02em; }
body.rp #auth form { display: block; }
body.rp #auth .form-group { width: auto !important; min-width: 0 !important; max-width: none !important; margin: 0 0 16px; text-align: left; }
/* the old theme fixes widths (inputs min 350px, button row ~120px); the card decides now */
body.rp #auth .form-control { min-width: 0 !important; max-width: 100% !important; display: block; }
body.rp #auth .log-in-buttons, body.rp #auth .password-group { width: 100% !important; min-width: 0 !important; }
body.rp #auth .form-control { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--rp-line-strong); border-radius: 3px; background: #0d0a08; color: var(--rp-parch); font-family: var(--rp-body); font-size: 1rem; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5); transition: border-color 0.2s, box-shadow 0.2s; }
body.rp #auth .form-control::placeholder { color: var(--rp-parch-3); opacity: 1; }
body.rp #auth .form-control:focus { outline: none; border-color: var(--rp-gold-hi); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(201, 164, 92, 0.2); }
body.rp #auth .password-group { position: relative; }
body.rp #auth .password-group .form-control { padding-right: 52px; }
body.rp #auth .password-toggle { position: absolute; top: 0; right: 0; width: 50px; height: 50px; padding: 0; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23c9a45c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 22px no-repeat; font-size: 0; color: transparent; cursor: pointer; }
body.rp #auth .checkbox-container { display: flex; align-items: flex-start; gap: 10px; width: 100%; color: var(--rp-parch-2); font-size: 0.98rem; line-height: 1.45; text-align: left; cursor: pointer; }
body.rp #auth .checkbox-container > span:last-child { min-width: 0; overflow-wrap: anywhere; }
/* Leftover social row from the CMS template: its links go nowhere and its images are missing. */
body.rp #auth .auth-social { display: none !important; }
body.rp #auth .log-in-buttons { margin-top: 8px; }
body.rp #auth .login-btn, body.rp #auth button[type="submit"] { width: 100%; height: 52px; display: inline-flex; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid #f6b46f; border-radius: 3px; background: linear-gradient(180deg, var(--rp-ember-hi) 0%, var(--rp-ember) 48%, var(--rp-ember-lo) 100%); box-shadow: inset 0 1px 0 rgba(255, 228, 190, 0.55), inset 0 -2px 0 rgba(60, 18, 2, 0.5), 0 8px 22px rgba(212, 83, 28, 0.35); color: #fff6e6; font-family: var(--rp-display); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-shadow: 0 1px 1px rgba(60, 18, 2, 0.6); cursor: pointer; }
body.rp #auth .login-btn:hover, body.rp #auth button[type="submit"]:hover { box-shadow: inset 0 1px 0 rgba(255, 228, 190, 0.7), inset 0 -2px 0 rgba(60, 18, 2, 0.5), 0 12px 30px rgba(242, 128, 58, 0.45); }
body.rp #auth p { margin: 0; color: var(--rp-parch-2); text-align: center; font-size: 0.98rem; }
body.rp #auth a { color: var(--rp-gold-hi); }
body.rp #auth .text-danger, body.rp #auth .mt-2, body.rp #auth ul.text-sm { margin-top: 6px; color: #f3a28a; font-size: 0.92rem; list-style: none; padding: 0; }
body.rp #auth .alert-success { margin-bottom: 16px; padding: 10px 12px; border: 1px solid rgba(126, 166, 74, 0.55); border-radius: 3px; background: rgba(126, 166, 74, 0.12); color: #cfe6b0; }
@media (max-width: 560px) {
  body.rp #auth { align-items: flex-start; padding: 28px 12px 48px; }
  body.rp #auth .register-block { padding: 26px 18px 20px; }
  body.rp #auth h3 { font-size: 1.5rem; margin-bottom: 18px; }
}

/* ---------- Legal documents (Terms of Use, Privacy Policy): a Read surface ---------- */
.rp-page-hero--short { min-height: 340px; padding-bottom: 48px; }
.rp-doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding: 48px 0 40px; }
.rp-doc-toc { position: sticky; top: calc(var(--rp-header-h) + 24px); padding: 18px 18px 14px; border: 1px solid var(--rp-line); border-radius: 4px; background: var(--rp-ink-1); }
.rp-doc-toc p { margin: 0 0 10px; color: var(--rp-gold-hi); font-family: var(--rp-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.rp-doc-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: rp-toc; }
.rp-doc-toc li { counter-increment: rp-toc; }
.rp-doc-toc a { display: flex; gap: 8px; padding: 5px 0; color: var(--rp-parch-2); font-size: 0.93rem; text-decoration: none; }
.rp-doc-toc a::before { content: counter(rp-toc) "."; color: var(--rp-parch-3); min-width: 1.4em; font-variant-numeric: tabular-nums; }
.rp-doc-toc a:hover { color: var(--rp-parch); }
.rp-doc-body { max-width: 72ch; }
.rp-doc-body section { scroll-margin-top: calc(var(--rp-header-h) + 20px); padding-bottom: 8px; }
.rp-doc-body section + section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rp-line); }
.rp-doc-body h2 { margin: 0 0 12px; color: var(--rp-gold-hi); font-family: var(--rp-display); font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; }
.rp-doc-body p, .rp-doc-body li { color: var(--rp-parch-2); line-height: 1.7; }
.rp-doc-body p { margin: 0 0 14px; }
.rp-doc-body ul { margin: 0 0 14px; padding: 0; list-style: none; }
.rp-doc-body li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.rp-doc-body li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; background: var(--rp-ember-hi); transform: rotate(45deg); }
.rp-doc-body strong { color: var(--rp-parch); }
.rp-callout { margin: 0 0 18px; padding: 16px 18px; border: 1px solid rgba(242, 128, 58, 0.55); border-radius: 4px; background: rgba(212, 83, 28, 0.1); color: var(--rp-parch-2); line-height: 1.65; }
.rp-callout strong { display: block; margin-bottom: 4px; color: var(--rp-parch); font-size: 1.05rem; }
@media (max-width: 960px) {
  .rp-doc { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .rp-doc-toc { position: static; }
  .rp-doc-toc ol { columns: 2; column-gap: 20px; }
}
@media (max-width: 560px) {
  .rp-page-hero--short { min-height: 0; }
  .rp-doc-toc ol { columns: 1; }
  .rp-doc-body h2 { font-size: 1.2rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rp-nav a { padding: 10px 9px; font-size: 0.8rem; letter-spacing: 0.07em; }
  .rp-hero-in { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .rp-hero-side { justify-self: start; }
}
@media (max-width: 960px) {
  .rp-nav, .rp-actions .rp-lang, .rp-actions .rp-btn--ghost { display: none; }
  .rp-burger { display: block; }
  .rp-actions { margin-left: auto; }
  .rp-highlights { grid-template-columns: minmax(0, 1fr); }
  .rp-steps { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .rp-steps::before { top: 32px; bottom: 32px; left: 43px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--rp-ember), var(--rp-line)); }
  .rp-step { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 22px; padding-left: 12px; }
  .rp-step-num { margin-bottom: 0; }
  .rp-news { grid-template-columns: minmax(0, 1fr); }
  .rp-footer-in { grid-template-columns: 1fr 1fr; }
  .rp-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  :root { --rp-header-h: 64px; --rp-wrap: calc(100% - 32px); }
  body.rp { font-size: 16px; }
  .rp-header-in { width: calc(100% - 32px); gap: 12px; }
  .rp-brand img { height: 32px; }
  .rp-actions .rp-btn--primary { --rp-btn-pad: 9px 14px; font-size: 0.74rem; letter-spacing: 0.08em; }
  .rp-hero { min-height: auto; }
  /* phones: the painting sits across the top at a fixed height so the figure shows above the logo */
  .rp-hero-art { background-size: auto 560px; background-position: var(--rp-hero-pos-m, 27% 0); }
  .rp-hero::before { background: linear-gradient(180deg, rgba(11, 9, 7, 0.15) 0%, rgba(11, 9, 7, 0.35) 22%, rgba(11, 9, 7, 0.88) 46%, var(--rp-ink-0) 62%); }
  .rp-hero-in { width: calc(100% - 32px); padding: calc(var(--rp-header-h) + 210px) 0 56px; }
  .rp-hero-pitch { font-size: 1.04rem; }
  .rp-hero-cta .rp-btn { flex: 1 1 100%; }
  .rp-scroll-cue { display: none; }
  .rp-section { padding: 64px 0; }
  .rp-gauge { grid-template-columns: 62px minmax(0, 1fr) 42px; gap: 10px; }
  .rp-hl { grid-template-columns: 50px minmax(0, 1fr); }
  .rp-hl-go { display: none; }
  .rp-band { padding: 36px 22px; }
  .rp-band::before { background: linear-gradient(180deg, rgba(11, 9, 7, 0.72) 0%, rgba(11, 9, 7, 0.94) 55%); }
  .rp-band-cta .rp-btn { flex: 1 1 100%; }
  .rp-footer-in { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-top: 44px; }
  .rp-footer-brand { grid-column: 1 / -1; }
  .rp-footer ul { gap: 0; }
  .rp-footer ul a { display: block; padding: 7px 0; font-size: 1rem; }
  .rp-vote img { height: 36px; }
  .rp-legal { flex-direction: column; }
}
/* ---------- Right-to-left (Arabic). Latin words keep Cinzel/Alegreya, Arabic glyphs use Noto Kufi Arabic. ---------- */
html[dir="rtl"] { --rp-display: 'Cinzel', 'Noto Kufi Arabic', serif; --rp-body: 'Alegreya Sans', 'Noto Kufi Arabic', sans-serif; }
html[dir="rtl"] body.rp, html[dir="rtl"] body.rp * { letter-spacing: 0 !important; }
html[dir="rtl"] body.rp { line-height: 1.75; }
html[dir="rtl"] .rp-lang-menu { right: auto; left: 0; }
/* paintings: in RTL the copy sits on the right, so the figures go left (no mirroring) */
html[dir="rtl"] .rp-hero-art, html[dir="rtl"] .rp-page-hero-art.is-flipped { transform: none; }
html[dir="rtl"] .rp-hero::before { background:
    linear-gradient(270deg, rgba(11, 9, 7, 0.97) 0%, rgba(11, 9, 7, 0.88) 30%, rgba(11, 9, 7, 0.35) 62%, rgba(11, 9, 7, 0.15) 100%),
    linear-gradient(0deg, var(--rp-ink-0) 0%, rgba(11, 9, 7, 0) 38%),
    radial-gradient(120% 80% at 30% 40%, rgba(0, 0, 0, 0) 40%, rgba(11, 9, 7, 0.65) 100%); }
html[dir="rtl"] .rp-page-hero::before { background:
    linear-gradient(270deg, rgba(11, 9, 7, 0.96) 0%, rgba(11, 9, 7, 0.82) 34%, rgba(11, 9, 7, 0.25) 70%, rgba(11, 9, 7, 0.1) 100%),
    linear-gradient(0deg, var(--rp-ink-0) 0%, rgba(11, 9, 7, 0) 45%); }
html[dir="rtl"] .rp-band::before { background: linear-gradient(270deg, rgba(11, 9, 7, 0.96) 0%, rgba(11, 9, 7, 0.82) 45%, rgba(11, 9, 7, 0.25) 100%); }
html[dir="rtl"] .rp-hero-logo { margin: 0 -6px 18px 0; }
html[dir="rtl"] .rp-gauge-fill { inset: 0 0 0 auto; transform-origin: right; }
html[dir="rtl"] .rp-hl-go svg { transform: scaleX(-1); }
html[dir="rtl"] .rp-hl:hover .rp-hl-go { transform: translateX(-4px); }
html[dir="rtl"] .rp-hl:hover { background: linear-gradient(270deg, rgba(201, 164, 92, 0.08), rgba(201, 164, 92, 0)); }
html[dir="rtl"] .rp-steps::before { background: linear-gradient(270deg, var(--rp-ember), var(--rp-line-strong) 60%, var(--rp-line)); }
html[dir="rtl"] .rp-doc-body li { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] .rp-doc-body li::before { left: auto; right: 4px; }
html[dir="rtl"] body.rp #auth .form-group { text-align: right; }
html[dir="rtl"] body.rp #auth .password-group .form-control { padding-right: 14px; padding-left: 52px; }
html[dir="rtl"] body.rp #auth .password-toggle { right: auto; left: 0; }
html[dir="rtl"] body.rp #auth .checkbox-container { text-align: right; }
@media (max-width: 960px) {
  html[dir="rtl"] .rp-steps::before { left: auto; right: 43px; background: linear-gradient(180deg, var(--rp-ember), var(--rp-line)); }
  html[dir="rtl"] .rp-step { padding-left: 0; padding-right: 12px; }
}
@media (max-width: 560px) {
  html[dir="rtl"] .rp-hero::before { background: linear-gradient(180deg, rgba(11, 9, 7, 0.15) 0%, rgba(11, 9, 7, 0.35) 22%, rgba(11, 9, 7, 0.88) 46%, var(--rp-ink-0) 62%); }
  html[dir="rtl"] .rp-page-hero::before { background: linear-gradient(180deg, rgba(11, 9, 7, 0.35) 0%, rgba(11, 9, 7, 0.85) 55%, var(--rp-ink-0) 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .rp-hero-logo, .rp-hero-copy > *, .rp-hero-side, .rp-scroll-cue svg { animation: none !important; }
  .rp-btn, .rp-nav a::after, .rp-hl, .rp-hl-go { transition: none !important; }
}
