/* ---------------------------------------------------------------------------
   RightsfuAlly inner pages — registration, OTP, thank-you, terms, privacy.

   Loaded by catalogues/rights_inner_base.html, AFTER the three home
   stylesheets, and scoped under `.rights-inner` so nothing here can reach the
   home page or the rest of the site.

   These pages were built before the home-page redesign and carried their own
   look: indigo gradients, 20px radii, deep drop shadows, a 15-value type scale.
   Sitting behind the redesigned header they read as a different product. This
   file restates them in the home page's own idiom — off-white ground, flat
   1px rules, square corners.

   TYPE RULE (deliberate, do not "restore" the home page's faces here):
   the only display type on an inner page is the page title, `.inner-title`,
   in Instrument Serif. EVERYTHING else — labels, inputs, buttons, steps,
   section dividers, body copy — is DM Sans (`--app-font-sans`) in sentence
   case. The first pass used Instrument Serif for body and DM Mono for every
   label, which is three faces on one form: the display serif has thin strokes
   that fight small input text, and uppercase letter-spaced mono labels above
   every field are slow to scan when you are actually filling the thing in.
   A form is read to be completed, not admired.

   The markup keeps its original `.erm-*` class names. Re-skinning through the
   existing classes leaves the forms, the modals and their JavaScript exactly
   as they were, so this is a change of appearance and nothing else.
   --------------------------------------------------------------------------- */

/* ── page frame ─────────────────────────────────────────────────────────── */

/* The header is `position: fixed`, so every inner page has to leave room for
   it — the home page gets this from the hero's own padding. */
.rights-inner {
  padding-top: 6.5rem;
  min-height: 100vh;
}

/* The home page's header starts transparent over the hero and only takes a
   background once a scroll handler adds `.scrolled`. That handler lives in the
   home template, and these pages have no full-bleed hero to be transparent
   over — so without this the very first thing a visitor sees is the form
   scrolling underneath the nav links. Same treatment as `.scrolled`, applied
   from the start. */
.rights-inner .site-header {
  background: #f7f7f7f2;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px #d5d5d5;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Inner pages are a single measure-limited column, CENTRED in the viewport —
   not a 1080px column with the content pinned to its left edge, which left a
   third of the screen empty on the right and read as misaligned. The heading
   and the card below it share this column, so they still line up with each
   other; the whole block is what moves to the middle. */
.rights-inner .inner-hero {
  max-width: 844px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
}

.rights-inner .inner-title {
  color: #171717;
  font: 400 clamp(2.6rem, 5.4vw, 4.4rem) / .95 var(--app-font-serif);
  letter-spacing: -.045em;
  margin: .9rem 0 0;
}

.rights-inner .inner-title em { color: #777; font-style: italic; }

.rights-inner .inner-intro {
  color: #666;
  max-width: 620px;
  font-family: var(--app-font-serif);
  font-size: 1.08rem;
  line-height: 1.45;
  margin: 1.25rem 0 0;
}

.rights-inner .inner-body {
  max-width: 844px;
  margin: 0 auto;
  padding: 3.5rem 2rem 6rem;
}

/* The OTP and thank-you pages hold one short card, so their column is tighter
   still. Both sections take the modifier or neither does — they have to agree
   or the heading and the card stop lining up. */
.rights-inner .inner-hero--narrow,
.rights-inner .inner-body--narrow { max-width: 624px; }

/* ── registration: the two-column shell ─────────────────────────────────── */

.rights-inner .erm-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* `minmax(0, …)` rather than a bare fraction: a grid track's default minimum
   is min-content, and the reCAPTCHA widget is a fixed 304px, so on a narrow
   phone the column grew past the viewport. `.rights-page` is `overflow:hidden`,
   so that overflow was CLIPPED, not scrollable — the submit button and consent
   text were simply cut off at the right edge with no way to reach them. */
.rights-inner .erm-split {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

/* Left panel: a quiet companion column, not a coloured advert. The home page
   makes its point with type and a rule, so this does the same. */
.rights-inner .erm-aside {
  position: relative;
  padding: 2.6rem 2.2rem;
  color: #1f1f1f;
  background: #f2f2f2;
  border-right: 1px solid #cfcfcf;
  min-width: 0;
}

.rights-inner .erm-aside:before { content: none; }

.rights-inner .erm-aside .erm-eyebrow {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #666;
  font-family: var(--app-font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rights-inner .erm-aside h2 {
  color: #171717;
  font: 600 1.6rem/1.25 var(--app-font-sans);
  letter-spacing: -.01em;
  margin: 1rem 0 .9rem;
}

.rights-inner .erm-aside p.lead {
  color: #555;
  font-family: var(--app-font-sans);
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.rights-inner .erm-benefits { list-style: none; padding: 0; margin: 0 0 2rem; }

.rights-inner .erm-benefits li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dcdcdc;
  color: #444;
  font-family: var(--app-font-sans);
  font-size: .92rem;
  line-height: 1.55;
}

.rights-inner .erm-benefits li:last-child { border-bottom: 0; }

.rights-inner .erm-benefits .tick {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .18rem;
  border-radius: 0;
  background: #111;
  color: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rights-inner .erm-benefits .tick svg { width: .7rem; height: .7rem; }

.rights-inner .erm-trustrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-top: 1.4rem;
  border-top: 1px solid #cfcfcf;
  color: #777;
  font-family: var(--app-font-sans);
  font-size: .8rem;
  line-height: 1.5;
}

/* ── registration: the form column ──────────────────────────────────────── */

.rights-inner .erm-form-panel { padding: 2.6rem 2.4rem 2.4rem; min-width: 0; }

.rights-inner .erm-form-panel h1 {
  color: #171717;
  font: 600 1.6rem/1.25 var(--app-font-sans);
  letter-spacing: -.01em;
  margin: 0 0 .5rem;
}

.rights-inner .erm-form-panel .erm-sub {
  color: #666;
  font-family: var(--app-font-sans);
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

/* steps */
.rights-inner .erm-steps { display: flex; align-items: center; gap: .6rem; margin-bottom: 2rem; }

.rights-inner .erm-step {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #999;
  font-family: var(--app-font-sans);
  font-size: .78rem;
  font-weight: 600;
}

.rights-inner .erm-step .num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0;
  border: 1px solid #cfcfcf;
  background: none;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--app-font-sans);
  font-size: .75rem;
}

.rights-inner .erm-step.active { color: #171717; }
.rights-inner .erm-step.active .num { background: #111; border-color: #111; color: #f7f7f7; }
.rights-inner .erm-step-line { flex: 1; height: 1px; background: #cfcfcf; border-radius: 0; min-width: .8rem; }

/* section headers */
.rights-inner .erm-section-title {
  color: #666;
  font-family: var(--app-font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 2rem 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid #cfcfcf;
}

.rights-inner .erm-section-title:first-of-type { margin-top: 0; }

.rights-inner .erm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.rights-inner .erm-grid .full { grid-column: 1 / -1; }

.rights-inner .erm-field label {
  display: block;
  margin-bottom: .35rem;
  color: #444;
  font-family: var(--app-font-sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.rights-inner .erm-field label .req { color: #a33; }

/* Inputs. The site theme paints form controls for a dark UI and out-specifies
   anything single-class, which is why the original used !important throughout;
   the same is needed here. Square, hairline, transparent — the home page's
   contact form in its light-panel form. */
.rights-inner .erm-shell .form-control,
.rights-inner .erm-shell input[type=text],
.rights-inner .erm-shell input[type=email],
.rights-inner .erm-shell input[type=url],
.rights-inner .erm-shell input[type=tel],
.rights-inner .erm-shell select,
.rights-inner .erm-shell textarea {
  width: 100% !important;
  background: #fff !important;
  color: #171717 !important;
  border: 1px solid #cfcfcf !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: .8rem .9rem !important;
  height: auto !important;
  font-family: var(--app-font-sans) !important;
  font-size: .95rem !important;
  line-height: 1.4 !important;
  transition: border-color .15s;
}

.rights-inner .erm-shell .form-control::placeholder { color: #999 !important; }

.rights-inner .erm-shell .form-control:focus,
.rights-inner .erm-shell input:focus,
.rights-inner .erm-shell select:focus,
.rights-inner .erm-shell textarea:focus {
  border-color: #111 !important;
  box-shadow: none !important;
  outline: none !important;
}

.rights-inner .erm-shell .errorlist {
  color: #a33;
  font-family: var(--app-font-sans);
  font-size: .8rem;
  list-style: none;
  padding: 0;
  margin: .4rem 0 0;
}

/* consent row, captcha, submit */
.rights-inner .erm-tc-row {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: 2rem 0 0;
  padding: 1rem;
  background: #f7f7f7;
  border: 1px solid #cfcfcf;
  border-radius: 0;
}

.rights-inner .erm-tc-row input[type=checkbox] {
  margin-top: .15rem;
  width: 1rem;
  height: 1rem;
  accent-color: #111;
}

.rights-inner .erm-tc-row label {
  display: inline;
  margin: 0;
  color: #444;
  font-family: var(--app-font-sans);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

.rights-inner .erm-tc-row a { color: #111; font-weight: 500; cursor: pointer; text-decoration: underline; }

.rights-inner .erm-captcha { margin: 1.4rem 0 0; }

.rights-inner .btn-erm {
  width: 100%;
  margin-top: 1.4rem;
  padding: .95rem 1rem;
  background: #111;
  color: #f7f7f7;
  border: 1px solid #111;
  border-radius: 0;
  font-family: var(--app-font-sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.rights-inner .btn-erm:hover { background: #444; border-color: #444; }
.rights-inner .btn-erm:active { transform: none; }
.rights-inner .btn-erm:disabled { opacity: .5; cursor: not-allowed; }

.rights-inner .erm-secure {
  text-align: center;
  margin-top: 1rem;
  color: #999;
  font-family: var(--app-font-sans);
  font-size: .8rem;
}

.rights-inner .erm-secure svg { width: .75rem; height: .75rem; vertical-align: -1px; margin-right: .3rem; }

/* messages */
.rights-inner .erm-msgs .alert {
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid #cfcfcf;
  border-left-width: 3px;
  border-radius: 0;
  background: #f7f7f7;
  color: #333;
  font-family: var(--app-font-sans);
  font-size: .9rem;
}

.rights-inner .erm-msgs .alert-success { border-left-color: #2f6f4f; }
.rights-inner .erm-msgs .alert-error,
.rights-inner .erm-msgs .alert-danger { border-left-color: #a33; }
.rights-inner .erm-msgs .alert-warning { border-left-color: #b4801f; }
.rights-inner .erm-msgs .alert-info { border-left-color: #111; }

/* ── legal modals (registration page) ───────────────────────────────────── */

.rights-inner .erm-modal-bg { display: none; position: fixed; inset: 0; background: rgba(17, 17, 17, .55); z-index: 1300; }

.rights-inner .erm-modal {
  display: none;
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  width: 94%;
  max-width: 880px;
  max-height: 86vh;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  z-index: 1310;
}

.rights-inner .erm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 1.1rem 1.6rem;
  background: #fff;
  border-bottom: 1px solid #cfcfcf;
}

.rights-inner .erm-modal-head h2 {
  margin: 0;
  color: #171717;
  font: 400 1.5rem/1.1 var(--app-font-serif);
  letter-spacing: -.02em;
}

.rights-inner .erm-modal-close { cursor: pointer; font-size: 1.6rem; line-height: 1; color: #999; padding: 0 .2rem; }
.rights-inner .erm-modal-close:hover { color: #111; }
.rights-inner .erm-modal-body { flex: 1 1 auto; padding: 1.6rem; overflow: auto; -webkit-overflow-scrolling: touch; }
.rights-inner .erm-modal-foot { flex: 0 0 auto; padding: .9rem 1.6rem; text-align: right; background: #f7f7f7; border-top: 1px solid #cfcfcf; }

.rights-inner .erm-modal-ok {
  padding: .65rem 1.4rem;
  background: #111;
  color: #f7f7f7;
  border: 1px solid #111;
  border-radius: 0;
  font-family: var(--app-font-sans);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}

.rights-inner .erm-modal-ok:hover { background: #444; border-color: #444; }

/* ── legal pages (standalone Terms / Privacy) ───────────────────────────── */

/* Fills the centred column set above, so its left edge is the heading's left
   edge. Giving the card its own max-width inside a wider column is what put
   two different left edges on the page. */
.rights-inner .legal-doc {
  max-width: none;
  margin: 0;
  padding: 2.6rem;
  background: #fff;
  border: 1px solid #cfcfcf;
}

/* Body copy stays in the site's SANS face (DM Sans), NOT the display serif the
   headings use. Instrument Serif is a display cut: at 14-15px over forty pages
   of legal text its thin strokes are genuinely hard to read, which is what
   forcing it onto every <p> here produced. The partial's own type scale is
   otherwise left alone — only the size and colour are lifted for reading. */
.rights-inner .legal-doc,
.rights-inner .legal-doc .erm-legal-doc {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
}

/* The document repeats its own title ("Privacy Policy") directly under the
   page heading that already says it. One is enough; the page heading is the
   h1 that matters. The modal on the registration page has its own header, so
   this is scoped to the standalone pages only. */
.rights-inner .legal-doc .erm-legal-doc > h1 { display: none; }

/* ── OTP + thank-you: a single narrow card ──────────────────────────────── */

.rights-inner .inner-card {
  max-width: none;
  margin: 0;
  padding: 2.6rem;
  background: #fff;
  border: 1px solid #cfcfcf;
}

.rights-inner .inner-card h1 {
  color: #171717;
  font: 600 1.5rem/1.3 var(--app-font-sans);
  letter-spacing: -.01em;
  margin: .8rem 0 .6rem;
}

.rights-inner .inner-card p {
  color: #555;
  font-family: var(--app-font-sans);
  font-size: .95rem;
  line-height: 1.6;
}

.rights-inner .inner-card .inner-card-note {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid #cfcfcf;
  color: #777;
  font-family: var(--app-font-sans);
  font-size: .85rem;
  line-height: 1.6;
}

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 920px) {
  .rights-inner .erm-split { grid-template-columns: minmax(0, 1fr); }
  .rights-inner .erm-aside { border-right: 0; border-bottom: 1px solid #cfcfcf; padding: 2rem 1.6rem; }
  .rights-inner .erm-form-panel { padding: 2rem 1.6rem; }
  .rights-inner .erm-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .rights-inner { padding-top: 5.5rem; }
  .rights-inner .inner-hero,
  .rights-inner .inner-body,
  .rights-inner .erm-shell { padding-left: 1.1rem; padding-right: 1.1rem; }
  .rights-inner .legal-doc,
  .rights-inner .inner-card { padding: 1.6rem 1.3rem; }
  .rights-inner .erm-modal-head,
  .rights-inner .erm-modal-body,
  .rights-inner .erm-modal-foot { padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* The three step labels do not fit a phone; the heading already says where
   the visitor is. */
@media (max-width: 480px) {
  .rights-inner .erm-steps { display: none !important; }
}

/* The reCAPTCHA widget is a fixed 304px and cannot be told to be narrower.
   Below ~365px the column is no longer that wide, so scale it down — 345px was
   too late, the widget was already overflowing by then. `transform` does not
   change layout width, which is why the `minmax(0, …)` tracks above are the
   half of this fix that actually stops the clipping. */
@media (max-width: 365px) {
  .rights-inner .erm-captcha {
    transform: scale(.86);
    transform-origin: left top;
    height: 67px;
  }
}

/* ── OTP entry + resend ─────────────────────────────────────────────────── */

.rights-inner .erm-otp-input {
  display: block;
  width: 100%;
  margin: 1.6rem 0 0;
  padding: 1rem;
  background: #fff !important;
  color: #171717 !important;
  border: 1px solid #cfcfcf !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  /* The one deliberate exception to the sans-everywhere rule: a 6-digit code
     is read digit by digit, and a monospace face keeps them evenly spaced and
     unambiguous (0/O, 1/l). This is data entry of a code, not prose. */
  font-family: var(--app-font-mono) !important;
  font-size: 1.6rem !important;
  letter-spacing: .5em;
  text-align: center;
  text-indent: .5em;              /* balances the trailing letter-space */
}

.rights-inner .erm-otp-input:focus { border-color: #111 !important; outline: none !important; }
.rights-inner .erm-otp-input::placeholder { color: #cfcfcf !important; }

.rights-inner .erm-resend form { display: inline; }

.rights-inner .erm-resend button {
  padding: 0;
  background: none;
  border: 0;
  color: #111;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.rights-inner .erm-resend button:disabled { color: #aaa; cursor: not-allowed; text-decoration: none; }

/* The thank-you page's button is an anchor, so it needs the box the <button>
   rule gives the others. The admin theme paints anchors purple and wins on
   specificity, hence the explicit colour. */
.rights-inner a.btn-erm {
  display: inline-block;
  width: auto;
  color: #f7f7f7 !important;
  text-decoration: none;
}

.rights-inner a.btn-erm:hover { color: #f7f7f7 !important; }

/* The two decorative icons in the left panel carry hardcoded colours from the
   old palette (an orange tick, a blue-grey shield). They are inline SVG in the
   markup, so the stroke has to be overridden here rather than edited into
   every copy. */
.rights-inner .erm-benefits .tick svg path { stroke: #f7f7f7; }
.rights-inner .erm-trustrow svg path { stroke: #999; }
