:root {
    --bg: #fdfcfb;
    --card-bg: #ffffff;
    --text: #333333;
    --muted: #555555;
    --border: #333333;
    --sketchy-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; 
}

/* Custom Highlighter Selection */
::selection {
    background: #fce473; 
    color: var(--text);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    background-image: radial-gradient(#d5d5d5 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0;
}

h1, h2, h3, h4, .btn, .tech-stack, .nav-links a {
    font-family: 'Neucha', cursive;
}

header {
    padding: 1rem 2rem; /* Slightly tighter header */
    border-bottom: 2px solid var(--border);
    background: var(--card-bg);
    border-radius: 0 0 15px 255px / 0 0 15px 15px;
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s;
}

.logo a:hover {
    transform: rotate(-1deg) scale(1.02);
}

.logo-icon {
    height: 35px;
    width: auto;
    margin-right: 12px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2.0px;
    font-family: 'Neucha', cursive;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    transition: transform 0.1s ease;
    display: inline-block;
}

.nav-links a:hover { 
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-style: wavy;
    transform: rotate(-2deg);
}



/* Create a gap and a divider before the News link */
.nav-links a[href*="news"] {
    margin-left: 2rem; /* More space to the left of News */
    position: relative;
    padding-left: 1rem;
}

/* The vertical line */
.nav-links a[href*="news"]::before {
    content: "";
    position: absolute;
    left: -0.5rem;
    top: 15%;
    height: 70%;
    width: 2px;
    background-color: var(--border);
    transform: rotate(2deg); /* Keeps the sketchy, non-perfect look */
    opacity: 0.5;
}
.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem; /* Tighter padding to fit manifesto on screen */
    text-align: center;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text);
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text);
    max-width: 800px;
    margin: 0 auto;
}

/* UPDATED: Wider Manifesto */
.manifesto {
    background: #ffffff;
    padding: 3rem 2rem; /* Reduced vertical padding */
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-radius: var(--sketchy-radius);
    margin: 1.5rem auto; 
    width: 85%; /* Base width for responsiveness */
    max-width: 1200px; /* Wider limit */
    box-shadow: inset 0 0 0 2px var(--bg);
    transform: rotate(0.5deg); /* Slightly less extreme rotation for wide layouts */
}

.content-wrapper {
    max-width: 1000px; /* Wider content container */
    margin: 0 auto;
    font-size: 1.05rem;
    transform: rotate(-0.5deg); 
}

.manifesto h2 { 
    margin-bottom: 1.5rem; 
    font-size: 2.2rem;
}

.manifesto p { 
    margin-bottom: 1.2rem; 
    color: var(--text); 
}

.tech-stack {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: var(--text);
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tech-stack span:nth-child(odd) {
    border: 2px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: var(--sketchy-radius);
    transform: rotate(-2deg);
    box-shadow: 2px 2px 0px var(--border);
    transition: transform 0.2s;
    cursor: default;
}

.tech-stack span:nth-child(odd):hover {
    transform: rotate(2deg) scale(1.05);
}

.tech-stack span:nth-child(even) {
    display: none; 
}

.hubs-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.path-quip {
    text-align: center;
    font-family: 'Neucha', cursive;
    font-size: 1.0rem;
    color: var(--muted);
    margin-bottom: 3rem;
    transform: rotate(-2.8deg); /* Makes it look like a scribbled note */
    display: block;
}

.hub-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--border);
    border-radius: var(--sketchy-radius);
    box-shadow: 6px 6px 0px var(--border);
    transition: box-shadow 0.2s, transform 0.1s ease-out; 
    text-align: left;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: 10px 10px 0px var(--border);
    z-index: 2; 
}

.card h2 { 
    margin-bottom: 1rem; 
    font-size: 2rem; 
}

.card p { 
    color: var(--text); 
    margin-bottom: 2.5rem; 
    font-size: 1rem; 
    flex-grow: 1;
}

.btn { 
    align-self: flex-start;
    color: var(--card-bg); 
    background-color: var(--border);
    font-weight: bold; 
    font-size: 1.2rem; 
    padding: 0.4rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: var(--sketchy-radius);
    transition: background-color 0.2s, color 0.2s;
}

.card:hover .btn {
    background-color: transparent;
    color: var(--text);
}

footer {
    padding: 4rem 1.5rem;
    text-align: center;
}

.footer-content p {
    font-family: 'Neucha', cursive;
    font-size: 1.2rem;
}

.footer-links { 
    margin-top: 1rem; 
}

.footer-links a { 
    color: var(--text); 
    font-size: 1rem; 
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid var(--border);
}

.footer-links a:hover {
    border-bottom-style: dashed;
}

@media (max-width: 768px) {
    .manifesto { width: 95%; margin: 1rem auto; }
}

@media (max-width: 600px) {
    .hub-options { grid-template-columns: 1fr; }
    .logo-text { font-size: 1.6rem; }
}

/* Styles for the Forum & Wiki Guide Page */

.secondary-hero {
    padding: 4rem 1.5rem 2rem;
}

.guide-section {
    margin-bottom: 4rem;
}

.alt-rotate {
    transform: rotate(-0.5deg) !important;
}

.alt-rotate .content-wrapper {
    transform: rotate(0.5deg) !important;
}

.guide-section ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    list-style: none;
}

.guide-section ul li::before {
    content: "•";
    color: var(--border);
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

.synergy-box {
    background: #fdfcfb;
    border-style: dashed;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.rule-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--sketchy-radius);
    background: #fff;
}

.rule-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.footer-note {
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    margin-top: 2rem;
    color: var(--muted);
}

.footer-note a {
    color: var(--text);
    font-weight: bold;
}

/* Note link under landing page cards */
.guide-link-container {
    text-align: center;
    margin-top: 3rem;
}

.guide-note {
    font-family: 'Neucha', cursive;
    font-size: 1.1rem;
    color: var(--muted);
    background: #fce473; /* Highlighter yellow Post-it feel */
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    transform: rotate(1deg);
    border: 1px solid var(--border);
    box-shadow: 4px 4px 0px var(--border);
}

.guide-note a {
    color: var(--text);
    font-weight: bold;
    text-decoration: underline;
}

/* Tab System Styles */
.binder {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--sketchy-radius);
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto;
    box-shadow: 10px 10px 0px var(--border);
    overflow: hidden; /* Keeps the sketchy border clean */
}

.binder-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: 2px solid transparent;
    font-family: 'Neucha', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--sketchy-radius);
}

.tab-btn.active {
    border-color: var(--border);
    background: #fce473;
}

.tab-content { 
    display: none; 
    animation: fadeIn 0.4s; 
    /* Set a minimum height so the box doesn't collapse/expand sharply */
    min-height: 320px; 
}

.tab-content.active-content { 
    display: block; 
}

.sketch-box {
    margin: 2rem 0;
    padding: 1rem;
    border: 2px dashed var(--border);
    background: #fdfcfb;
    transform: rotate(-0.5deg);
}

/* Rules Tab System */
.rules-binder {
    max-width: 800px;
    margin: 5rem auto;
}

.rules-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rule-tab {
    background: #fff;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    font-family: 'Neucha', cursive;
    cursor: pointer;
    transform: rotate(-1deg);
}

.rule-tab.active {
    background: var(--border);
    color: #fff;
    transform: rotate(1deg);
}

.rules-display {
    min-height: 200px; /* Fixed height for the smaller rule box */
    text-align: center;
    padding: 2.5rem 2rem;
    border: 2px solid var(--border);
    border-radius: var(--sketchy-radius);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rule-content { 
    display: none; 
    width: 100%;
}

.rule-content.active-rule { 
    display: block; 
    animation: fadeIn 0.3s; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sketchy-divider {
    border: 0;
    height: 2px;
    background-image: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 4rem 0;
}

.hero-mini {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-mini h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 0.5rem;
}

.sub-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: flex-start;
}

.sub-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    color: var(--muted);
    transition: all 0.2s;
}

.sub-btn.active {
    color: var(--text);
    border-bottom: 2px solid #fce473;
}

/* Stability Fixes for Sub-Tabs */
.sub-tab-wrapper {
    min-height: 280px; /* Ensures the main binder doesn't jump when switching sub-tabs */
}

.sub-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sub-content.active-sub {
    display: block;
}

/* Layout centering for Hero */
.hero-mini {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
}