/* ============================================================
   RANLOC STORY - styled as a SECTION of manawild.com
   Sits on top of manawild.css (Bootstrap 3 grid, fixed white header,
   green #2faa5a rule, Kanit). Uses the site's own greens so it reads as
   part of the site; the RANLOC red is kept only as the section's accent
   mark, not as a page theme.
   All classes are prefixed .ranloc- so nothing else on the site shifts.
   ============================================================ */

:root {
	--rl-green: #2faa5a;
	--rl-green-dark: #1f9d55;
	--rl-forest: #15241b;
	--rl-forest-2: #0f3b23;
	--rl-accent: #e0334a;          /* RANLOC mark only */
	--rl-accent-2: #b3001b;
	--rl-txt: #2b2b2b;
	--rl-txt-dim: #6b6b6b;
	--rl-line: #e6e9e6;
	--rl-paper: #ffffff;
	--rl-tint: #f4f8f5;            /* very light green wash */
	--rl-radius: 12px;
}

/* the fixed site header covers the top of the page; the site's own pages
   compensate with .wrapper padding — mirror that so the hero is not hidden */
body.ranloc-page .ranloc-wrap { padding-top: 92px; }
@media (max-width: 767px) { body.ranloc-page .ranloc-wrap { padding-top: 60px; } }

/* manawild.css paints <body> deep forest (#0b160f) because the homepage sits
   on a full-bleed hero and the dark never shows. RANLOC is a reading section
   with cards on a page, so it needs a light ground - scoped to this body class
   only, the rest of the site is untouched. The wrapper is the actual page. */
body.ranloc-page { background: #f6f8f6 !important; font-family: 'Kanit', sans-serif; color: var(--rl-txt); }
body.ranloc-page .ranloc-wrap { background: #f6f8f6; min-height: 60vh; }

/* plugin.js injects the homepage slideshow's loader (#supersized-loader) on
   every page and only hides it once slides initialise. RANLOC has no
   slideshow, so it would spin forever - the homepage theme CSS hides these the
   same way. */
body.ranloc-page #supersized-loader, body.ranloc-page #supersized { display: none !important; }
.ranloc-page a { color: var(--rl-green-dark); }
.ranloc-page a:hover { color: var(--rl-forest-2); }

/* ---------- section hero (light green wash, sits under the site header) ---------- */
.ranloc-hero {
	background: linear-gradient(180deg, var(--rl-tint) 0%, #ffffff 100%);
	border-bottom: 1px solid var(--rl-line);
	padding: 34px 0 26px;
}
.ranloc-hero-slim { padding: 16px 0 12px; }
/* the site theme sets .container{width:100%}; give the section its own gutter
   so the hero and body never touch the viewport edge */
.ranloc-hero > .container, .ranloc-body.container { max-width: 1180px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.ranloc-hero-in { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ranloc-mark {
	width: 58px; height: 58px; flex: none; border-radius: 14px;
	background: linear-gradient(135deg, var(--rl-accent) 0%, var(--rl-accent-2) 100%);
	box-shadow: 0 6px 18px rgba(224, 51, 74, .28);
	color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .5px;
	display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.15;
	text-decoration: none;
}
.ranloc-hero-slim .ranloc-mark { width: 44px; height: 44px; font-size: 10px; border-radius: 11px; }
.ranloc-mark-link:hover { color: #fff; text-decoration: none; filter: brightness(1.06); }
.ranloc-hero-text { flex: 1 1 320px; min-width: 0; }
.ranloc-kicker { display: block; font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--rl-green-dark); font-weight: 500; }
.ranloc-kicker a { color: inherit; text-decoration: none; }
.ranloc-hero h1 { margin: 2px 0 6px; font-size: clamp(26px, 4vw, 40px); font-weight: 700; color: var(--rl-forest); line-height: 1.15; }
.ranloc-hero p { margin: 0; max-width: 720px; color: var(--rl-txt-dim); font-size: 15.5px; line-height: 1.6; }
.ranloc-hero-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.ranloc-lang a, .ranloc-lang span { padding: 4px 9px; border-radius: 8px; color: var(--rl-txt-dim); text-decoration: none; }
.ranloc-lang .on { background: rgba(47, 170, 90, .14); color: var(--rl-green-dark); font-weight: 600; }
.ranloc-user { color: var(--rl-txt-dim); font-size: 13.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- body ---------- */
.ranloc-body { padding: 26px 15px 60px; }
.ranloc-flash { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; font-size: 14.5px; border: 1px solid; }
.ranloc-flash.ok  { background: #eef8f1; border-color: #bfe3cc; color: #1f6f3d; }
.ranloc-flash.err { background: #fdeeef; border-color: #f2c1c7; color: #9b1f30; }

.ranloc-listhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.ranloc-listhead h2 { margin: 0; font-size: 24px; font-weight: 600; color: var(--rl-forest); }
.ranloc-cur { margin-left: auto; font-size: 13px; color: var(--rl-txt-dim); }

/* ---------- story cards ---------- */
.ranloc-card {
	background: var(--rl-paper); border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
	padding: 20px 22px; margin-bottom: 14px;
	transition: box-shadow .2s, border-color .2s, transform .2s;
}
.ranloc-card:hover { border-color: rgba(47, 170, 90, .5); box-shadow: 0 8px 26px rgba(21, 36, 27, .08); transform: translateY(-1px); }
.ranloc-card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; line-height: 1.35; }
.ranloc-card h3 a { color: var(--rl-forest); text-decoration: none; }
.ranloc-card h3 a:hover { color: var(--rl-green-dark); }
.ranloc-card p { color: var(--rl-txt); font-size: 15px; line-height: 1.65; margin: 8px 0 0; }
.ranloc-empty { color: var(--rl-txt-dim); text-align: center; padding: 34px 20px; }
.ranloc-meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--rl-txt-dim); }
.ranloc-meta span { white-space: nowrap; }
.ranloc-meta span + span::before { content: "•"; margin: 0 9px; color: var(--rl-green); }
@media (max-width: 480px) { .ranloc-meta span + span::before { margin: 0 6px; } .ranloc-meta { font-size: 12.5px; } }
.ranloc-cardfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ranloc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ranloc-tag {
	display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
	color: var(--rl-green-dark); background: rgba(47, 170, 90, .1); border: 1px solid rgba(47, 170, 90, .25);
}
.ranloc-readmore { font-size: 14px; font-weight: 500; white-space: nowrap; }

/* ---------- panels (submit form, guidelines, how-to) ---------- */
.ranloc-panel {
	background: var(--rl-paper); border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
	padding: 22px 24px; margin-bottom: 18px;
	border-top: 4px solid var(--rl-green);
}
.ranloc-panel h2, .ranloc-info h2 { margin: 0 0 4px; font-size: 21px; font-weight: 600; color: var(--rl-forest); }
.ranloc-sub { color: var(--rl-txt-dim); font-size: 13.5px; margin: 0 0 14px; line-height: 1.55; }
.ranloc-info ol, .ranloc-info ul { margin: 8px 0 0 20px; padding: 0; color: var(--rl-txt); font-size: 14.5px; }
.ranloc-info li { margin-bottom: 6px; line-height: 1.55; }
.ranloc-gate { color: var(--rl-txt); font-size: 14.5px; margin: 0 0 14px; }

.ranloc-input, .ranloc-textarea, .ranloc-select {
	width: 100%; margin-bottom: 11px; padding: 11px 13px;
	background: #fff; border: 1px solid #d5dad6; border-radius: 9px;
	color: var(--rl-txt); font-family: inherit; font-size: 14.5px;
	transition: border-color .15s, box-shadow .15s;
}
.ranloc-input:focus, .ranloc-textarea:focus, .ranloc-select:focus {
	outline: none; border-color: var(--rl-green); box-shadow: 0 0 0 3px rgba(47, 170, 90, .16);
}
.ranloc-textarea { min-height: 170px; resize: vertical; }

.ranloc-tagpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.ranloc-tagpick label {
	padding: 5px 13px; border: 1px solid #d5dad6; border-radius: 999px;
	font-size: 13px; color: var(--rl-txt-dim); cursor: pointer; user-select: none; font-weight: 400; margin: 0;
	transition: all .15s;
}
.ranloc-tagpick input { display: none; }
.ranloc-tagpick label:has(input:checked) { border-color: var(--rl-green); background: rgba(47, 170, 90, .1); color: var(--rl-green-dark); font-weight: 500; }

.ranloc-btn {
	display: inline-block; padding: 11px 26px; border: 0; border-radius: 10px; cursor: pointer;
	background: linear-gradient(135deg, var(--rl-green) 0%, var(--rl-green-dark) 100%);
	color: #fff !important; font-family: inherit; font-size: 15px; font-weight: 500; text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(47, 170, 90, .3); transition: transform .15s, box-shadow .15s;
}
.ranloc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(47, 170, 90, .38); }
.ranloc-btn-ghost {
	display: inline-block; padding: 10px 20px; border-radius: 10px;
	border: 1px solid #cfd6d1; color: var(--rl-forest); font-size: 14px; text-decoration: none;
}
.ranloc-btn-ghost:hover { border-color: var(--rl-green); color: var(--rl-green-dark); text-decoration: none; }
.ranloc-formfoot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ranloc-mailto { font-size: 13.5px; }
.ranloc-privnote { margin: 12px 0 0; font-size: 12.5px; color: var(--rl-txt-dim); line-height: 1.5; }

/* ---------- pager ---------- */
.ranloc-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 22px 0; font-size: 14px; }
.ranloc-pager a, .ranloc-pager .cur { padding: 6px 13px; border-radius: 9px; border: 1px solid var(--rl-line); color: var(--rl-txt-dim); text-decoration: none; }
.ranloc-pager a:hover { border-color: var(--rl-green); color: var(--rl-green-dark); }
.ranloc-pager .cur { background: rgba(47, 170, 90, .12); color: var(--rl-green-dark); border-color: var(--rl-green); font-weight: 600; }

/* ---------- single story ---------- */
.ranloc-back { display: inline-block; margin-bottom: 14px; font-size: 14px; }
.ranloc-article {
	background: var(--rl-paper); border: 1px solid var(--rl-line); border-radius: var(--rl-radius);
	padding: 30px 34px; border-top: 4px solid var(--rl-green);
}
.ranloc-article h1 { margin: 0 0 8px; font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; line-height: 1.3; color: var(--rl-forest); }
.ranloc-article .ranloc-tags { margin: 10px 0 0; }
.ranloc-storybody { margin-top: 22px; font-size: 16.5px; line-height: 1.85; color: var(--rl-txt); white-space: pre-wrap; word-wrap: break-word; }
.ranloc-anon-note {
	margin-top: 26px; padding: 11px 15px; border-left: 3px solid var(--rl-green);
	background: var(--rl-tint); font-size: 13px; color: var(--rl-txt-dim); border-radius: 0 9px 9px 0;
}
.ranloc-storyfoot { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }
@media (max-width: 767px) { .ranloc-article { padding: 22px 18px; } }

/* ---------- auth ---------- */
.ranloc-authwrap { max-width: 460px; margin: 10px auto 40px; }
.ranloc-authtabs { display: flex; gap: 8px; margin-bottom: 16px; }
.ranloc-authtabs a {
	flex: 1; text-align: center; padding: 10px; border-radius: 10px;
	border: 1px solid var(--rl-line); color: var(--rl-txt-dim); font-size: 15px; text-decoration: none;
}
.ranloc-authtabs a.on { background: rgba(47, 170, 90, .12); color: var(--rl-green-dark); border-color: var(--rl-green); font-weight: 600; }
.ranloc-authtabs a:hover { color: var(--rl-green-dark); }
