/* =========================================================
   Pro Carp Community — navigation
   Grouped desktop menus, header icon rail and the mobile drawer
   ========================================================= */

/* ---------- Header icon rail ---------- */

/* The header must sit above hero content, which carries its own z-index. */
.site-header {
    z-index: 900;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 4px;
    margin-right: 4px;
    border-right: 1px solid rgba(240, 232, 213, .12);
}

.header-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: rgba(243, 239, 227, .7);
    transition: color .2s ease, background .2s ease;
}

.header-icon:hover,
.header-icon:focus-visible {
    color: var(--gold);
    background: rgba(201, 168, 106, .12);
}

.header-icon-dot {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gold);
    color: #12180f;
    font-size: 11px;
    font-weight: 800;
    line-height: 15px;
    text-align: center;
    letter-spacing: 0;
}

/* ---------- Grouped desktop dropdown ---------- */

.nav-dropdown--crew   { width: 400px; }
.nav-dropdown--fishing { width: 520px; }
.nav-dropdown--club   { width: 520px; }
.nav-dropdown--more   { width: 480px; }

.nav-dropdown-head {
    padding: 4px 14px 10px;
    color: rgba(243, 239, 227, .38);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.nav-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

.nav-dropdown--fishing .nav-dropdown-grid,
.nav-dropdown--club .nav-dropdown-grid,
.nav-dropdown--more .nav-dropdown-grid {
    grid-template-columns: 1fr 1fr;
}

.nav-dropdown a {
    flex-direction: row;
    align-items: flex-start;
    gap: 11px;
}

.nav-dropdown-ico {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    border: 1px solid rgba(240, 232, 213, .14);
    border-radius: 3px;
    color: var(--gold);
    transition: border-color .2s ease, background .2s ease;
}

.nav-dropdown a:hover .nav-dropdown-ico,
.nav-dropdown a.is-active .nav-dropdown-ico {
    border-color: rgba(201, 168, 106, .45);
    background: rgba(201, 168, 106, .14);
}

.nav-dropdown-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nav-pill {
    display: inline-block;
    min-width: 16px;
    padding: 1px 5px;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--gold);
    color: #12180f;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
    vertical-align: 1px;
}

/* User dropdown gets the same icon alignment */
.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-dropdown .nav-ico {
    color: rgba(243, 239, 227, .45);
    flex: 0 0 auto;
}

.user-dropdown a:hover .nav-ico,
.user-dropdown button:hover .nav-ico {
    color: var(--gold);
}

/* ---------- Mobile drawer ---------- */

.mobile-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(240, 232, 213, .1);
}

.mobile-nav-user strong {
    display: block;
    color: var(--paper);
    font-size: 15px;
}

.mobile-nav-user span {
    color: rgba(243, 239, 227, .5);
    font-size: 12px;
}

.mobile-nav-group {
    padding-top: 14px;
}

.mobile-nav-label {
    margin: 0 0 6px;
    color: rgba(243, 239, 227, .35);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.mobile-nav nav a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    color: rgba(243, 239, 227, .4);
    transition: color .2s ease;
}

.mobile-nav nav a.is-active .mobile-nav-ico,
.mobile-nav nav a:hover .mobile-nav-ico {
    color: var(--gold);
}

.mobile-nav nav a .nav-pill {
    margin-left: auto;
}


/* Keep wide panels inside the viewport: anchor the right-hand groups to their
   right edge instead of centring them under a trigger near the screen edge. */
.nav-group:last-of-type .nav-dropdown,
.nav-dropdown--more {
    left: auto;
    right: -18px;
    transform: translateY(-8px);
}

.nav-group:last-of-type.is-open .nav-dropdown,
.nav-dropdown--more {
    transform: translateY(0);
}

.nav-group:last-of-type .nav-dropdown::before,
.nav-dropdown--more::before {
    left: auto;
    right: 46px;
    transform: rotate(45deg);
}

@media (max-width: 1280px) {
    .header-icons {
        display: none;
    }
}

@media (max-width: 900px) {
    .nav-dropdown--crew,
    .nav-dropdown--fishing,
    .nav-dropdown--club,
    .nav-dropdown--more {
        width: auto;
    }
}

/* ---------- Feed: tabs, follow suggestions, who is on the bank ---------- */

.feed-tabs {
    display: flex;
    gap: 6px;
    margin: 22px 0 18px;
    border-bottom: 1px solid rgba(var(--ink-rgb), .12);
}

.feed-tabs a {
    position: relative;
    padding: 10px 16px;
    color: rgba(var(--ink-rgb), .55);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    transition: color .2s ease;
}

.feed-tabs a:hover {
    color: var(--forest);
}

.feed-tabs a.is-active {
    color: var(--forest);
}

.feed-tabs a.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--gold);
}

.feed-tabs-count {
    display: inline-block;
    min-width: 16px;
    padding: 1px 5px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(var(--ink-rgb), .1);
    font-size: 11px;
    letter-spacing: 0;
    text-align: center;
}

.follow-suggest,
.who-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.follow-suggest li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.follow-suggest li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.follow-suggest-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.follow-suggest-copy strong {
    font-size: 13px;
    line-height: 1.2;
}

.follow-suggest-copy small {
    color: rgba(var(--ink-rgb), .55);
    font-size: 11px;
}

.who-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

@media (max-width: 760px) {
    .follow-suggest li {
        flex-wrap: wrap;
    }
}

/* ---------- Moderation: post actions, hidden posts, chat remove ---------- */

.feed-card-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.feed-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: rgba(var(--ink-rgb), .5);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s ease;
}

.feed-action:hover {
    color: #9c3226;
}

.hidden-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hidden-list p {
    margin: 0 0 2px;
    font-size: 12px;
    line-height: 1.45;
}

.hidden-list span {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
}

.chat-message {
    position: relative;
}

.chat-message-mod {
    position: absolute;
    top: 6px;
    right: 8px;
    opacity: 0;
    transition: opacity .2s ease;
}

.chat-message:hover .chat-message-mod,
.chat-message-mod:focus-within {
    opacity: 1;
}

.chat-message-mod button {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid rgba(240, 232, 213, .18);
    border-radius: 50%;
    background: rgba(10, 18, 12, .8);
    color: rgba(243, 239, 227, .6);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
}

.chat-message-mod button:hover {
    border-color: #c0554a;
    color: #ff8a7a;
}

/* ---------- Single post view ---------- */

.post-page {
    max-width: 720px;
    margin: 0 auto;
}

.post-back {
    margin-bottom: 18px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.post-back a {
    color: rgba(var(--ink-rgb), .6);
}

.post-back a:hover {
    color: var(--forest);
}

.feed-card--single {
    margin-bottom: 16px;
}

.feed-card--single img {
    width: 100%;
    height: auto;
    margin-top: 14px;
}

.post-hidden-note {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 3px solid #9c3226;
    background: rgba(156, 50, 38, .07);
    color: #6d2119;
    font-size: 13px;
    line-height: 1.5;
}

.post-likes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(var(--ink-rgb), .6);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.post-share-note {
    color: rgba(var(--ink-rgb), .55);
    font-size: 12px;
}

.post-share-note code {
    padding: 2px 6px;
    background: rgba(var(--ink-rgb), .07);
    font-size: 11px;
    word-break: break-all;
}

.feed-time {
    color: inherit;
    border-bottom: 1px dotted rgba(var(--ink-rgb), .3);
}

.feed-time:hover {
    color: var(--forest);
    border-bottom-color: var(--gold);
}

/* ---------- Dropdown legibility ----------
   The panel sits over the hero. backdrop-filter blurs what is behind it, but
   Chrome then composites the panel semi-transparently, so the headline showed
   through. A solid background is what makes the menu readable. */
.nav-dropdown {
    background: #0c150e;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nav-dropdown::before {
    background: #0c150e;
}

/* ---------- Single post: heading and share line ---------- */

.post-detail-page .section {
    padding-top: 40px;
    padding-bottom: 64px;
}

.post-title {
    margin: 0 0 18px;
    font-family: var(--font-body);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: .01em;
    text-transform: none;
    color: var(--forest);
}

.post-share-note {
    margin-top: 18px;
    color: rgba(var(--ink-rgb), .72);
    font-size: 13px;
}

.post-share-note code {
    padding: 3px 8px;
    font-size: 12px;
}

.post-back {
    margin-bottom: 14px;
}

/* ---------- Help desk ---------- */

.ticket {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 22px;
    margin-bottom: 20px;
}

.ticket-head {
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.ticket-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ticket-status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: rgba(var(--ink-rgb), .08);
    color: var(--ink-soft);
}

.ticket-status--open {
    background: rgba(201, 168, 106, .22);
    color: #6d4f18;
}

.ticket-status--waiting {
    background: rgba(120, 84, 168, .16);
    color: #4b3170;
}

.ticket-status--answered {
    background: rgba(52, 118, 84, .16);
    color: #205a3c;
}

.ticket-status--closed {
    background: rgba(var(--ink-rgb), .08);
    color: rgba(var(--ink-rgb), .55);
}

.ticket-cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(var(--ink-rgb), .55);
}

.ticket-message {
    padding: 14px 16px;
    margin-bottom: 12px;
    background: var(--paper-2);
    border-left: 3px solid rgba(var(--ink-rgb), .18);
}

.ticket-message--staff {
    background: rgba(201, 168, 106, .1);
    border-left-color: var(--gold);
}

.ticket-message-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.ticket-tag {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--gold);
    color: #241c0c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ticket-time {
    margin-left: auto;
    color: rgba(var(--ink-rgb), .5);
    font-size: 11px;
}

.ticket-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.ticket-reply {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.ticket-closed {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(var(--ink-rgb), .06);
    font-size: 13px;
    color: rgba(var(--ink-rgb), .7);
}

.ticket-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.ticket-filters a {
    padding: 5px 10px;
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(var(--ink-rgb), .65);
}

.ticket-filters a.is-on {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--cream);
}

.ticket-filters b {
    font-weight: 800;
    opacity: .75;
}

.ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ticket-list li + li {
    border-top: 1px solid var(--line);
}

.ticket-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "status subject pill" "status meta pill";
    gap: 3px 12px;
    align-items: center;
    padding: 13px 4px;
    color: inherit;
    transition: background .15s ease;
}

.ticket-list a:hover {
    background: rgba(var(--ink-rgb), .035);
}

.ticket-list a:hover .ticket-list-subject {
    color: var(--gold-deep);
}

.ticket-list .ticket-status {
    grid-area: status;
    align-self: start;
    margin-top: 1px;
}

.ticket-list-subject {
    grid-area: subject;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ticket-list-meta {
    grid-area: meta;
    color: rgba(var(--ink-rgb), .55);
    font-size: 11px;
    line-height: 1.5;
}

.ticket-list-meta b {
    font-weight: 700;
    color: rgba(var(--ink-rgb), .72);
}

.ticket-chevron {
    grid-area: pill;
    align-self: center;
    color: rgba(var(--ink-rgb), .3);
    display: inline-flex;
}

.ticket-list li.is-unread .ticket-list-subject {
    font-weight: 800;
}

.ticket-list li.is-unread {
    background: rgba(201, 168, 106, .07);
}

.ticket-opener {
    font-size: 13px;
    line-height: 1.7;
}

/* ---------- News ---------- */

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}

.news-filters a {
    padding: 6px 12px;
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(var(--ink-rgb), .65);
    background: var(--paper);
}

.news-filters a.is-on {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--cream);
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(var(--ink-rgb), .55);
}

.news-pin {
    padding: 2px 7px;
    background: var(--gold);
    color: #241c0c;
}

.news-lead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    margin-bottom: 26px;
    background: var(--forest);
    color: var(--cream);
    overflow: hidden;
}

.news-lead-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-lead-body {
    padding: clamp(22px, 3.4vw, 42px);
    align-self: center;
}

.news-lead .news-meta {
    color: rgba(243, 239, 227, .6);
}

.news-lead h2 {
    margin: 12px 0 10px;
    font-family: var(--font-display);
    font-size: clamp(30px, 3.6vw, 46px);
    font-weight: 400;
    line-height: .96;
    text-transform: uppercase;
}

.news-lead h2 a {
    color: var(--cream);
}

.news-lead h2 a:hover {
    color: var(--gold);
}

.news-lead p {
    color: rgba(243, 239, 227, .8);
    font-size: 14px;
    line-height: 1.6;
}

.news-byline {
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .6;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.news-card {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-card-image {
    margin: -18px -18px 6px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--forest-2);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.04);
}

.news-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.news-card h3 a {
    color: var(--ink);
}

.news-card h3 a:hover {
    color: var(--gold-deep);
}

.news-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(var(--ink-rgb), .75);
}

.draft-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 0 16px;
    font-size: 12px;
    color: rgba(var(--ink-rgb), .6);
}

.draft-strip a {
    padding: 3px 9px;
    background: rgba(var(--ink-rgb), .07);
    color: var(--ink-soft);
}

.field--check {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.field--check input {
    width: auto;
}

/* ---------- Article ---------- */

.article-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.article h1 {
    margin: 14px 0 12px;
    font-family: var(--font-display);
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 400;
    line-height: .94;
    text-transform: uppercase;
}

.article-standfirst {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.5;
    color: rgba(var(--ink-rgb), .78);
}

.article-byline {
    margin-bottom: 22px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(var(--ink-rgb), .55);
}

.article-photo {
    margin: 0 0 24px;
}

.article-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.article-body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink-soft);
}

.article-foot {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

/* ---------- Changelog ---------- */

.changelog {
    margin-bottom: 26px;
}

.changelog-month + .changelog-month {
    margin-top: 26px;
}

.changelog-month-head {
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--forest);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.changelog-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.changelog-item {
    padding: 14px 0 14px 16px;
    border-left: 3px solid var(--line);
}

.changelog-item + .changelog-item {
    margin-top: 4px;
}

.changelog-item--feature {
    border-left-color: var(--gold);
}

.changelog-item--fix {
    border-left-color: #347654;
}

.changelog-item--improvement {
    border-left-color: #3a5f8a;
}

.changelog-item--security {
    border-left-color: #9c3226;
}

.changelog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(var(--ink-rgb), .5);
}

.changelog-kind {
    color: var(--gold-deep);
}

.changelog-item h3 {
    margin: 6px 0 4px;
    font-size: 16px;
}

.changelog-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.changelog-draft {
    padding: 2px 7px;
    background: rgba(156, 50, 38, .12);
    color: #7d2a1f;
}

.changelog-tools {
    margin-top: 8px;
    font-size: 11px;
    color: rgba(var(--ink-rgb), .5);
}

/* ---------- Team ---------- */

.team-grid {
    display: grid;
    /* A single owner in a 1260px container left one small card and a lot of
       nothing, which reads as a page that failed to load the rest. Cap the
       track so the cards stay a sane size and the space stays empty on
       purpose. */
    grid-template-columns: repeat(auto-fill, minmax(260px, 300px));
    justify-content: start;
    gap: 16px;
    margin-bottom: 26px;
}

.team-sparse {
    max-width: 62ch;
    margin: -10px 0 26px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.team-add-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.team-add-form .field {
    flex: 1 1 200px;
    margin: 0;
}

.team-add-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.team-card {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--line);
}

.team-card--owner {
    border-top-color: var(--gold);
}

.team-card--admin {
    border-top-color: var(--forest-3);
}

.team-card--mod {
    border-top-color: #347654;
}

.team-card--helpdesk {
    border-top-color: #7854a8;
}

.team-avatar .avatar {
    width: 46px;
    height: 46px;
    font-size: 15px;
}

.team-body h2 {
    margin: 0 0 2px;
    font-size: 16px;
}

.team-body h2 a {
    color: var(--ink);
}

.team-role {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.team-bio {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(var(--ink-rgb), .75);
}

.team-seen {
    margin: 0;
    font-size: 11px;
    color: rgba(var(--ink-rgb), .5);
}

.team-role-form {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.team-role-form select {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--line);
    font-size: 12px;
    background: var(--paper);
}

.role-list {
    margin: 0;
}

.role-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 14px;
    padding: 10px 0;
    align-items: baseline;
}

.role-row + .role-row {
    border-top: 1px solid var(--line);
}

.role-row dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.role-chip {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: rgba(var(--ink-rgb), .08);
}

.role-chip--owner {
    background: var(--gold);
    color: #241c0c;
}

.role-chip--admin {
    background: var(--forest);
    color: var(--cream);
}

.role-chip--mod {
    background: rgba(52, 118, 84, .18);
    color: #205a3c;
}

.role-chip--helpdesk {
    background: rgba(120, 84, 168, .18);
    color: #4b3170;
}

.team-note {
    font-size: 13px;
    color: rgba(var(--ink-rgb), .65);
}

.button--danger {
    background: #9c3226;
    border-color: #9c3226;
    color: #fff;
}

@media (max-width: 760px) {
    .news-lead {
        grid-template-columns: 1fr;
    }

    .role-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* ---------- Help desk: edit, unread, head actions ---------- */

.ticket-head-actions {
    margin-top: 10px;
}

.text-link {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold-deep);
    border-bottom: 1px solid rgba(124, 95, 44, .3);
}

.text-link:hover {
    color: var(--forest);
    border-bottom-color: var(--forest);
}

.ticket-edit {
    padding: 4px 0 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.ticket-unread {
    grid-area: pill;
    justify-self: start;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gold);
    color: #241c0c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}



/* ---------- Help desk: reopen ---------- */

.ticket-closed form {
    margin-top: 12px;
}

.ticket-closed p + form {
    margin-top: 10px;
}

/* ---------- Help desk: ticket page, thread, list ---------- */

.page-head--ticket {
    align-items: flex-start;
}

.ticket-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(var(--ink-rgb), .6);
}

.ticket-back:hover {
    color: var(--gold-deep);
}

.ticket-title {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3.4vw, 2.35rem);
    line-height: 1.16;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.ticket-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    color: rgba(var(--ink-rgb), .6);
}

.ticket-byline-dot {
    color: rgba(var(--ink-rgb), .3);
}

.ticket-byline .ticket-status {
    margin-right: 2px;
}

.ticket-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.ticket-head-note {
    margin: 0;
    font-size: 12px;
    color: rgba(var(--ink-rgb), .58);
}

/* Thread: avatar column, then the message. */
.ticket-message {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
}

.ticket-message .avatar {
    margin-top: 1px;
}

.ticket-message-body {
    min-width: 0;
}

.ticket-message-head {
    margin-bottom: 6px;
}

.ticket-message p {
    overflow-wrap: anywhere;
}

.ticket-reply .field textarea {
    min-height: 96px;
    resize: vertical;
}

.ticket-reply .button {
    margin-top: 10px;
}

.ticket-closed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ticket-closed p {
    margin: 0;
}

@media (max-width: 640px) {
    .ticket-message {
        padding: 12px;
        gap: 10px;
    }

    .ticket-list a {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "subject pill" "meta pill";
    }

    .ticket-list .ticket-status {
        grid-area: auto;
        justify-self: start;
        margin-bottom: 4px;
    }

    .ticket-list li {
        padding: 4px 0;
    }

    .ticket-list a {
        grid-template-areas: "status status" "subject pill" "meta pill";
    }
}

/* ---------- First run / setup ---------- */

.setup-page {
    background: var(--cream, #f6f1e7);
    min-height: 100vh;
}

.setup {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 20px 72px;
}

.setup-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.setup-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--forest, #18281c);
    color: var(--gold, #c9a86a);
}

.setup-head h1 {
    margin: 4px 0 8px;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -.02em;
}

.setup-head p {
    margin: 0;
    max-width: 52ch;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(var(--ink-rgb), .68);
}

.setup-block {
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
    border-left: 3px solid var(--gold, #c9a86a);
    background: rgba(201, 168, 106, .12);
}

.setup-block--bad {
    border-left-color: #a83a2c;
    background: rgba(168, 58, 44, .1);
}

.setup-block ul {
    margin: 10px 0 8px;
    padding: 0;
    list-style: none;
}

.setup-block li.is-ok {
    color: #205a3c;
}

.setup-block li.is-bad {
    color: #a83a2c;
    font-weight: 700;
}

.setup-form {
    display: grid;
    gap: 20px;
}

.setup-card {
    background: var(--paper, #fffdf8);
    border: 1px solid var(--line, rgba(var(--ink-rgb), .12));
    padding: 24px;
}

.setup-card h2 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-deep, #7c5f2c);
}

.setup-note {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(var(--ink-rgb), .62);
}

.setup-card .field + .field {
    margin-top: 14px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-style: normal;
    color: rgba(var(--ink-rgb), .5);
}

.setup-card--quiet {
    background: rgba(var(--ink-rgb), .035);
}

.setup-list {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 1.9;
}

.setup-list strong {
    display: inline-block;
    min-width: 92px;
}

.setup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.setup-fineprint {
    margin: 0;
    font-size: 11px;
    color: rgba(var(--ink-rgb), .5);
}

.setup-fineprint code,
.setup-note code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    background: rgba(var(--ink-rgb), .07);
    padding: 1px 5px;
}

@media (max-width: 620px) {
    .field-row {
        grid-template-columns: 1fr;
    }

    .setup {
        padding: 28px 16px 56px;
    }
}

/* ---------- First run: the database step ---------- */

.setup-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.setup-choice-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--line, rgba(var(--ink-rgb), .12));
    background: var(--paper, #fffdf8);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.setup-choice-option:hover {
    border-color: rgba(201, 168, 106, .7);
}

.setup-choice-option:has(input:checked) {
    border-color: var(--gold-deep, #7c5f2c);
    background: rgba(201, 168, 106, .1);
}

.setup-choice-option input {
    margin-top: 3px;
    accent-color: var(--gold-deep, #7c5f2c);
}

.setup-choice-option strong {
    display: block;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink, #18281c);
}

.setup-choice-option em {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-style: normal;
    line-height: 1.5;
    color: rgba(var(--ink-rgb), .6);
}

.setup-db[hidden] {
    display: none;
}

@media (max-width: 620px) {
    .setup-choice {
        grid-template-columns: 1fr;
    }
}

.setup-choice-option--off {
    opacity: .55;
    cursor: not-allowed;
}

.setup-choice-option--off:hover {
    border-color: var(--line, rgba(var(--ink-rgb), .12));
}
