/* Page sheet for quests.php. Linked after style.css by includes/css.php,
   so these rules win ties against the shared sheet. */

/* Area tabs — same look as the maps page. */
.quests-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    justify-content: center;
}
/* Look comes from THE SWITCH primitive in style.css. This row is the
   page's primary navigation, so it runs larger than a board tab. */
.quests-tab { --tab-px: 26px; --tab-py: 11px; --tab-fs: 0.82rem; }

/* Language flag selector. */
.quests-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 10px 0 22px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 22px;
}
.quests-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    background: #09090b;
    text-decoration: none;
    color: var(--text-mid);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.quests-lang img { display: block; width: 20px; height: 13px; }
.quests-lang:hover { border-color: var(--accent); color: var(--text-main); }
.quests-lang.active {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb, 200, 160, 80), 0.12);
    color: #fff;
}

/* Quest index */
.quests-index {
    margin: 0 0 28px;
    padding: 16px 20px 18px;
    background: #0a0a0c;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}
.quests-index-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-mid);
    margin: 0 0 10px;
}
.quests-index-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 28px;
}
.quests-index-section h3 {
    margin: 0 0 6px;
    padding-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e7c98c;
    border-bottom: 1px solid var(--border-light);
}
.quests-index-section.good   h3 { color: var(--sage); }
.quests-index-section.evil   h3 { color: #c4555a; }
.quests-index-section.both   h3 { color: #e7c98c; }
.quests-index-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.quests-index-section li {
    margin: 0;
    padding: 0;
}
.quests-index-section a {
    display: block;
    padding: 3px 0;
    font-size: 0.95rem;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}
.quests-index-section a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Individual quest cards */
.quest {
    background: #0a0a0c;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 18px 22px;
    margin: 0 0 16px;
    scroll-margin-top: 18px;
    text-align: center;
}
.quest h3 {
    margin: 0 0 12px;
    font-size: 1.24rem;
    font-weight: 800;
    color: #e7c98c;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}
/* Quest walkthroughs are the longest continuous prose on the site,
   and Garamond's small x-height reads smaller than the metric says,
   so this steps above --fs-body (0.92rem) to sit at the 17px body
   voice. Leading opens with it: 1.55 was set against the old sans.

   Left-aligned, and deliberately NOT capped to a reading measure: the
   prose fills the card, which is about 200 characters a line at the
   1440px page cap. A 68ch column was tried on 2026-09-03 and rejected
   by the owner, it filled only 42 per cent of the card and left the
   box looking empty. Do not cap the measure again without asking. */
.quest-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
    text-align: left;
    /* A breathing margin, not a reading column. Per cent rather than
       px so it scales: about 64px a side at the 1440px page cap and
       dropped entirely under 600px, see the media query below. */
    padding: 0 5%;
}
.quest-body ul,
.quest-body lu {
    display: block;
    margin: 8px 0;
    padding-left: 22px;
}
.quest-body lu > li,
.quest-body ul > li { display: list-item; }
.quest-body p,
.quest-body div { margin: 0 0 8px; }
.quest-body b   { color: #e7c98c; }
.quest-body a   { color: var(--accent); text-decoration: none; }
.quest-body a:hover { text-decoration: underline; }
.quest-body a.npc-link,
.quest-body a.npc-link:visited { color: var(--sage); }
.quest-body a.npc-link:hover   { color: #8aaa78; }
.quest-body b a.npc-link,
.quest-body b a.npc-link:visited { color: var(--sage); }
.quest-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
    border: 1px solid var(--border-light);
    border-radius: 3px;
}
.quest-top {
    margin-top: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.quest-top a { color: var(--text-dim); text-decoration: none; }
.quest-top a:hover { color: var(--accent); }

.quests-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
}

@media (max-width: 600px) {
    .quests-tab { --tab-px: 16px; --tab-py: 9px; --tab-fs: 0.72rem; }
    .quests-index { grid-template-columns: 1fr; }
    /* The side margin is a wide-screen luxury. A phone card is about
       330px across and cannot spare 24px of it. */
    .quest-body { padding: 0; }
}
