/* ==========================================================================
   Velto forum — Hebrew RTL community
   --------------------------------------------------------------------------
   Written RTL-first. Every directional rule uses logical properties
   (inline-start / inline-end / margin-inline), so the layout mirrors from the
   document direction rather than from hand-flipped left/right values. Nothing
   here needs a separate RTL stylesheet.

   Kept deliberately lean rather than pulled from a framework: this is a public
   page and the whole sheet is a few kilobytes.
   ========================================================================== */

:root {
    --f-blue: #1d6fe0;
    --f-blue-dark: #1558b8;
    --f-blue-soft: #e8f1fd;
    --f-blue-tint: #f3f8ff;

    --f-ink: #17212f;
    --f-ink-soft: #5b6878;
    --f-ink-faint: #6f7783;

    --f-line: #e3e8ef;
    --f-line-soft: #eef1f6;
    --f-bg: #f6f8fb;
    --f-surface: #ffffff;

    --f-radius: 10px;
    --f-radius-lg: 14px;
    --f-shadow: 0 1px 2px rgba(23, 33, 47, .04);
    --f-shadow-lift: 0 4px 16px -6px rgba(23, 33, 47, .16);

    --f-max: 1240px;
    --f-gap: 16px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--f-bg);
    color: var(--f-ink);
    font-family: 'Heebo', 'Assistant', 'Noto Sans Hebrew', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;

    /* Keeps the footer at the bottom on short pages instead of floating
       halfway up the screen. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }

a { color: var(--f-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* A visible focus ring everywhere, because this is a keyboard-navigable site. */
:focus-visible {
    outline: 2px solid var(--f-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

.f-skip {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    padding: 10px 16px;
    background: var(--f-blue);
    color: #fff;
    transform: translateY(-120%);
    z-index: 100;
}
.f-skip:focus { transform: translateY(0); }

.f-shell { max-width: var(--f-max); margin-inline: auto; padding-inline: 20px; }

/* Available to a screen reader, invisible on screen. */
.f-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Numbers and Latin model names inside Hebrew text keep LTR run order. */
.f-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ==========================================================================
   Navbar
   ========================================================================== */

.f-nav {
    background: var(--f-surface);
    border-bottom: 1px solid var(--f-line);
    position: sticky;
    top: 0;
    z-index: 40;
}

.f-nav__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 60px;
}

.f-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--f-ink);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -.01em;
    flex: none;
}
.f-brand:hover { text-decoration: none; }
.f-brand__mark {
    /* Height-driven: the intrinsic 149x64 keeps the aspect ratio and reserves
       the right box before the image loads, so the navbar never jumps. */
    /* Wider than the old mark because it carries the word FORUM too. */
    height: 30px;
    width: auto;
    display: block;
}
/* Menu sits at the inline-end (visually left in RTL), actions at the start. */
.f-nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
    list-style: none;
    margin-block: 0;
    padding: 0;
}

.f-nav__link {
    display: block;
    padding: 8px 12px;
    color: var(--f-ink-soft);
    font-weight: 500;
    border-radius: var(--f-radius);
    white-space: nowrap;
}
.f-nav__link:hover { color: var(--f-ink); background: var(--f-line-soft); text-decoration: none; }

.f-nav__link[aria-current="page"] {
    color: var(--f-blue);
    font-weight: 600;
    background: none;
    position: relative;
}
.f-nav__link[aria-current="page"]::after {
    content: "";
    position: absolute;
    inset-inline: 12px;
    bottom: -10px;
    height: 2px;
    background: var(--f-blue);
    border-radius: 2px;
}

.f-nav__actions { display: flex; align-items: center; gap: 10px; }

.f-nav__toggle {
    display: none;
    background: none;
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius);
    padding: 7px 10px;
    cursor: pointer;
    color: var(--f-ink);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.f-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--f-radius);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.f-btn:hover { text-decoration: none; }

.f-btn--primary { background: var(--f-blue); color: #fff; }
.f-btn--primary:hover { background: var(--f-blue-dark); color: #fff; }

.f-btn--outline { background: var(--f-surface); color: var(--f-ink); border-color: var(--f-line); }
.f-btn--outline:hover { border-color: var(--f-blue); color: var(--f-blue); }

.f-btn--ghost { background: transparent; color: var(--f-blue); }
.f-btn--ghost:hover { background: var(--f-blue-soft); }

.f-btn--lg { padding: 12px 26px; font-size: 16px; }

/* ==========================================================================
   Hero
   --------------------------------------------------------------------------
   The banner is one wide image carrying both motor illustrations and their
   Hebrew annotations, with a deliberately empty middle. Measured, that clear
   middle is 44.5% of the image width and sits dead centre — so the headline
   column is capped to it and can never land on top of a motor.

   The artwork's own ground is a flat #eef6fe, so the same colour behind it
   makes the image's edges invisible however the viewport is shaped.
   ========================================================================== */

.f-hero {
    /* Stops growing past 1760px so a very wide screen doesn't scale the
       motors up absurdly; flat ground fills the rest, seamlessly. */
    --hero-art: min(100%, 1760px);

    background-color: #eef6fe;
    /* The motors without their old baked-in notes; the notes are live text now
       (see .f-hero__art below). */
    background-image: image-set(
        url("../images/forum-hero-clean.webp") type("image/webp"),
        url("../images/forum-hero-clean.png") type("image/png")
    );
    background-position: center;
    background-repeat: no-repeat;
    background-size: var(--hero-art) auto;

    /* The banner is 3:1. Showing 28vw rather than the full 33.33vw trims the
       artwork's own empty bands above and below the motors without reaching
       the motors themselves, which span 21%-69% of the image height. */
    min-height: min(28vw, 494px);

    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--f-line);
    padding-block: 36px;
    position: relative;
    overflow: hidden;
}

/* ---- handwritten notes over the hero motors -------------------------------
   The box matches the background artwork exactly (same width, 3:1, centred),
   so notes and arrows are placed in the artwork's own coordinates. */
.f-hero__art {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hero-art);
    aspect-ratio: 3 / 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    container-type: inline-size;
}
.f-hero > .f-shell { position: relative; z-index: 1; }

.f-note {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: .15em;
    font-family: "Amatic SC", "Heebo", cursive;
    font-weight: 700;
    font-size: 2.05cqw;
    line-height: 1.02;
    color: #2e3c5e;
    white-space: nowrap;
    text-align: right;
}
.f-note--left  { right: 88.4%; top: 53.4%; transform: rotate(-5deg); transform-origin: right top; }
.f-note--right { right: 1.6%;  top: 33.2%; transform: rotate(-3deg); transform-origin: right top; }

/* each line "writes itself" from right to left, one after the other */
.f-note__line {
    display: block;
    clip-path: inset(-.3em 0 -.3em 100%);
    animation: fNoteWrite .9s cubic-bezier(.45, .05, .35, 1) forwards;
}
.f-note--left  .f-note__line:nth-child(1) { animation-delay: .5s; }
.f-note--left  .f-note__line:nth-child(2) { animation-delay: 1.35s; }
.f-note--right .f-note__line:nth-child(1) { animation-delay: .9s; }
.f-note--right .f-note__line:nth-child(2) { animation-delay: 1.7s; }
.f-note--right .f-note__line:nth-child(3) { animation-delay: 2.4s; }
@keyframes fNoteWrite { to { clip-path: inset(-.3em 0 -.3em 0); } }

.f-note__arrows {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.f-arrow,
.f-arrowhead {
    fill: none;
    stroke: #2e3c5e;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: fArrowDraw .7s ease-out forwards;
}
.f-arrowhead { animation-duration: .3s; }
.f-arrow--left      { animation-delay: 2.25s; }
.f-arrowhead--left  { animation-delay: 2.9s; }
.f-arrow--right     { animation-delay: 3.25s; }
.f-arrowhead--right { animation-delay: 3.9s; }
@keyframes fArrowDraw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
    .f-note__line { animation: none; clip-path: none; }
    .f-arrow, .f-arrowhead { animation: none; stroke-dashoffset: 0; }
}

.f-hero__center {
    /* 44vw keeps the text inside the banner's clear middle at every width. */
    max-width: min(620px, 44vw);
    margin-inline: auto;
    text-align: center;
}

.f-hero__title {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--f-ink);
}

.f-hero__subtitle {
    margin: 0 0 20px;
    font-size: clamp(14px, 1.2vw, 17px);
    color: var(--f-ink-soft);
}

.f-search { display: flex; margin-bottom: 16px; }

.f-search__field {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--f-surface);
    border: 1px solid #ccd6e4;
    border-radius: var(--f-radius);
    box-shadow: var(--f-shadow);
}

.f-search__icon {
    position: absolute;
    inset-inline-start: 14px;
    color: var(--f-ink-faint);
    pointer-events: none;
    display: flex;
}

.f-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 16px;
    color: var(--f-ink);
    padding: 13px 16px;
    padding-inline-start: 46px;
    border-radius: var(--f-radius);
}
.f-search__input::placeholder { color: var(--f-ink-faint); }
.f-search__input:focus { outline: none; }
.f-search__field:focus-within { border-color: var(--f-blue); box-shadow: 0 0 0 3px var(--f-blue-soft); }

.f-hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

.f-section { padding-block: 22px; }

.f-section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.f-section__title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}
.f-section__title svg { color: var(--f-blue); flex-shrink: 0; }

.f-section__more { margin-inline-start: auto; font-size: 14px; font-weight: 600; white-space: nowrap; }

.f-card {
    background: var(--f-surface);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius-lg);
    box-shadow: var(--f-shadow);
}

/* ==========================================================================
   Category strip
   ========================================================================== */

.f-cats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--f-gap);
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

.f-cat {
    display: block;
    background: var(--f-surface);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius-lg);
    box-shadow: var(--f-shadow);
    padding: 18px 12px 16px;
    text-align: center;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.f-cat:hover {
    text-decoration: none;
    border-color: #c3d6f0;
    box-shadow: var(--f-shadow-lift);
    transform: translateY(-2px);
}

.f-cat__icon { color: var(--f-ink); margin-bottom: 10px; display: flex; justify-content: center; }
.f-cat:hover .f-cat__icon { color: var(--f-blue); }

.f-cat__name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.f-cat__stat { font-size: 12.5px; color: var(--f-ink-faint); line-height: 1.5; }

/* ==========================================================================
   Three-column main area
   ========================================================================== */

.f-main {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 260px;
    gap: var(--f-gap);
    align-items: start;
}

.f-panel { display: flex; flex-direction: column; }
.f-panel__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--f-line-soft);
}
.f-panel__title { margin: 0; font-size: 16px; font-weight: 700; }
.f-panel__icon { display: flex; }
.f-panel__foot { padding: 12px 16px; border-top: 1px solid var(--f-line-soft); }

/* --- Hot topics ------------------------------------------------------- */

.f-hot { list-style: none; margin: 0; padding: 6px 0; }
.f-hot__item { display: flex; align-items: center; gap: 11px; padding: 9px 16px; }
.f-hot__item + .f-hot__item { border-top: 1px solid var(--f-line-soft); }
.f-hot__item:hover { background: var(--f-blue-tint); }

.f-hot__rank {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--f-line-soft);
    color: var(--f-ink-soft);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f-hot__link { color: var(--f-ink); font-size: 14px; }
.f-hot__link:hover { color: var(--f-blue); }

/* --- Recent discussions table ------------------------------------------ */

.f-table-wrap { overflow-x: auto; }

.f-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.f-table th {
    text-align: start;
    font-weight: 500;
    font-size: 12.5px;
    color: var(--f-ink-faint);
    padding: 9px 14px;
    border-bottom: 1px solid var(--f-line-soft);
    background: #fbfcfe;
    white-space: nowrap;
}

.f-table td { padding: 11px 14px; border-bottom: 1px solid var(--f-line-soft); vertical-align: middle; }
.f-table tbody tr:last-child td { border-bottom: 0; }
.f-table tbody tr:hover { background: var(--f-blue-tint); }

.f-table__num { text-align: center; color: var(--f-ink-soft); white-space: nowrap; }
.f-table__topic a { font-weight: 500; }

.f-activity { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.f-activity__meta { font-size: 12.5px; color: var(--f-ink-faint); line-height: 1.35; }
.f-activity__user { display: block; color: var(--f-ink-soft); }

.f-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    background: var(--f-line-soft);
    color: var(--f-ink-soft);
}
.f-tag--qs205 { background: #ece7fb; color: #5b45b8; }
.f-tag--qs273 { background: #ece7fb; color: #5b45b8; }
.f-tag--controllers { background: #fdeed6; color: #9a6410; }
.f-tag--troubleshooting { background: #dff3e4; color: #1f7a3d; }
.f-tag--builds { background: #ddeafc; color: #1a5cb0; }
.f-tag--import { background: #e6eef7; color: #40617f; }
.f-tag--market { background: #fde5e8; color: #a83246; }

/* --- Avatars ------------------------------------------------------------ */

.f-avatar {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--f-line-soft);
    color: var(--f-ink-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.f-avatar--blue { background: var(--f-blue-soft); color: var(--f-blue); }
.f-avatar--lg { width: 34px; height: 34px; }

/* --- Top members -------------------------------------------------------- */

.f-members { list-style: none; margin: 0; padding: 6px 0; }
.f-member { display: flex; align-items: center; gap: 10px; padding: 9px 16px; }
.f-member + .f-member { border-top: 1px solid var(--f-line-soft); }
.f-member:hover { background: var(--f-blue-tint); }
.f-member__rank {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--f-line-soft);
    color: var(--f-ink-soft);
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.f-member__name { font-size: 14px; font-weight: 600; color: var(--f-ink); }
.f-member__points { font-size: 12.5px; color: var(--f-ink-faint); }

/* ==========================================================================
   Knowledge base
   ========================================================================== */

.f-kb { background: var(--f-blue-tint); border-color: #dbe7f8; padding: 18px; }

/* auto-fit collapses the tracks the content does not need, so three entries
   read as three rather than as a five-column grid with holes in it. */
.f-kb__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--f-gap);
}
/* For rows whose card count varies. auto-fit collapses the unused tracks and
   the cap stops two cards stretching across the full width, so a short row
   reads as a short row rather than as a broken four-column grid. */
.f-kb__grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* A card is now a photo with a caption under it, so the part is recognisable
   before the title is read. */
.f-kb__card {
    display: flex;
    flex-direction: column;
    background: var(--f-surface);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius);
    overflow: hidden;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.f-kb__card:hover {
    text-decoration: none;
    border-color: #bed5f3;
    box-shadow: var(--f-shadow-lift);
    transform: translateY(-2px);
}

.f-kb__media {
    position: relative;
    /* Reserves the box before the image arrives, so the grid never reflows. */
    aspect-ratio: 3 / 2;
    background: #f4f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.f-kb__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.f-kb__card:hover .f-kb__media img { transform: scale(1.03); }

/* Kept for an entry that has no photo yet. */
.f-kb__icon { color: var(--f-ink-faint); display: flex; }

.f-kb__body {
    padding: 13px 14px 15px;
    text-align: start;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.f-kb__title { font-weight: 700; font-size: 14.5px; margin-bottom: 5px; }
.f-kb__desc { font-size: 12.5px; color: var(--f-ink-faint); line-height: 1.55; }

/* The kind sits on the photo; the status sits with the text, where a caveat
   belongs. */
.f-kb__kind {
    position: absolute;
    inset-block-start: 9px;
    inset-inline-end: 9px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--f-blue);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.f-kb__status {
    align-self: flex-start;
    margin-top: 10px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.f-kb__status--ready { background: #dff3e4; color: #1f7a3d; }
.f-kb__status--wip { background: #fdeed6; color: #9a6410; }
.f-kb__status--draft { background: var(--f-line-soft); color: var(--f-ink-faint); }

.f-kbmodels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--f-line-soft);
}

.f-kbmodel { background: var(--f-surface); padding: 16px 18px; }

.f-kbmodel__head { display: flex; align-items: center; gap: 10px; }
.f-kbmodel__title { margin: 0; font-size: 16px; font-weight: 700; }
.f-kbmodel__head .f-kb__status { margin-inline-start: auto; }

.f-kbmodel__meta {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--f-ink-faint);
}

.f-kbmodel__summary {
    margin: 8px 0 12px;
    font-size: 13.5px;
    color: var(--f-ink-soft);
    line-height: 1.6;
}

.f-kbmodel__docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }

.f-kbdoc {
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 7px 0;
    font-size: 13.5px;
    border-top: 1px solid var(--f-line-soft);
}

.f-kbdoc__type {
    flex: none;
    min-width: 62px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--f-ink-faint);
}

/* A document with no page yet is dimmed and says so, rather than looking
   like a link that happens not to work. */
.f-kbdoc--none .f-kbdoc__title { color: var(--f-ink-faint); }
.f-kbdoc__flag {
    margin-inline-start: auto;
    font-size: 11.5px;
    color: var(--f-ink-faint);
    white-space: nowrap;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.f-faq { padding: 16px; }
/* align-items:start so opening one question does not stretch the other four
   into tall empty boxes. */
.f-faq__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: start; }

.f-faq__item {
    background: var(--f-surface);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius);
}
.f-faq__item[open] { border-color: #bed5f3; }

.f-faq__q {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}
.f-faq__q::-webkit-details-marker { display: none; }
.f-faq__q::after {
    content: "";
    margin-inline-start: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--f-ink-faint);
    border-bottom: 2px solid var(--f-ink-faint);
    transform: rotate(45deg);
    transition: transform .18s;
    flex: none;
}
.f-faq__item[open] .f-faq__q::after { transform: rotate(-135deg); }

.f-faq__a {
    padding: 0 14px 13px;
    font-size: 13.5px;
    color: var(--f-ink-soft);
    line-height: 1.65;
}

/* ==========================================================================
   Bottom CTA
   ========================================================================== */

.f-cta {
    background: var(--f-blue-tint);
    border: 1px solid #dbe7f8;
    border-radius: var(--f-radius-lg);
    padding: 22px 26px;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.f-cta__icon { color: var(--f-blue); flex: none; display: flex; }
.f-cta__body { flex: 1; min-width: 240px; }
.f-cta__title { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.f-cta__text { margin: 0; color: var(--f-ink-soft); font-size: 14px; }
.f-cta__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */

.f-footer {
    background: #2d3541;
    color: #c3cad4;
    margin-top: 26px;
    padding-block: 16px;
    font-size: 13px;
}
.f-footer__inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.f-footer__brand { font-weight: 500; display: flex; align-items: center; gap: 10px; }
.f-footer__logo { height: 24px; width: auto; display: block; opacity: .95; }
.f-footer__links { display: flex; gap: 16px; margin-inline-start: auto; list-style: none; margin-block: 0; padding: 0; }
.f-footer a { color: #c3cad4; }
.f-footer a:hover { color: #fff; }
.f-footer__copy { color: #959da9; }

/* ==========================================================================
   Inner pages
   ========================================================================== */

.f-page-head { padding-block: 26px 6px; }
.f-page-head__title { margin: 0 0 6px; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.f-page-head__sub { margin: 0; color: var(--f-ink-soft); }

.f-crumbs { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 12px; font-size: 13px; color: var(--f-ink-faint); }
.f-crumbs li::after { content: "/"; margin-inline-start: 8px; color: var(--f-line); }
.f-crumbs li:last-child::after { content: ""; }

.f-empty { padding: 44px 20px; text-align: center; color: var(--f-ink-soft); }
.f-empty__title { font-weight: 700; color: var(--f-ink); margin-bottom: 6px; }

.f-notice {
    background: #fff8e6;
    border: 1px solid #f5e2b0;
    border-radius: var(--f-radius);
    padding: 11px 14px;
    font-size: 13.5px;
    color: #7a5b12;
    margin-bottom: var(--f-gap);
}

.f-post { padding: 16px; }
.f-post + .f-post { border-top: 1px solid var(--f-line-soft); }
.f-post__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.f-post__author { font-weight: 600; font-size: 14px; }
.f-post__time { font-size: 12.5px; color: var(--f-ink-faint); }
.f-post__body { margin: 0; line-height: 1.75; }

.f-form { padding: 18px; display: grid; gap: 14px; }
.f-field { display: grid; gap: 6px; }
.f-label { font-size: 13.5px; font-weight: 600; }
.f-input,
.f-textarea,
.f-select {
    width: 100%;
    font: inherit;
    color: var(--f-ink);
    background: var(--f-surface);
    border: 1px solid #ccd6e4;
    border-radius: var(--f-radius);
    padding: 10px 12px;
}
.f-textarea { min-height: 150px; resize: vertical; }
.f-input:focus,
.f-textarea:focus,
.f-select:focus { outline: none; border-color: var(--f-blue); box-shadow: 0 0 0 3px var(--f-blue-soft); }
.f-hint { font-size: 12.5px; color: var(--f-ink-faint); }

/* ==========================================================================
   Responsive — the mockup is desktop-first; these keep the order and the
   meaning intact as the viewport narrows.
   ========================================================================== */

@media (max-width: 1180px) {
    .f-cats { grid-template-columns: repeat(4, 1fr); }
    .f-main { grid-template-columns: 260px minmax(0, 1fr); }
    /* The members rail drops under the discussions table rather than being
       squeezed into an unreadable column. */
    .f-main > .f-main__members { grid-column: 1 / -1; }
    .f-kb__grid,
    .f-faq__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .f-hero {
        background-image: none;
        min-height: 0;
        padding-block: 32px;
    }
    .f-hero__art { display: none; }
    .f-hero__center { max-width: 100%; }
    .f-cats { grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
    .f-main { grid-template-columns: 1fr; }
    .f-kb__grid { grid-template-columns: repeat(2, 1fr); }
    .f-faq__grid { grid-template-columns: repeat(2, 1fr); }
    .f-kbmodels { grid-template-columns: 1fr; }

    .f-nav__toggle { display: inline-flex; margin-inline-start: auto; }
    .f-nav__menu {
        display: none;
        position: absolute;
        inset-inline: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--f-surface);
        border-bottom: 1px solid var(--f-line);
        padding: 8px;
        box-shadow: var(--f-shadow-lift);
    }
    .f-nav__menu[data-open="true"] { display: flex; }
    .f-nav__link[aria-current="page"]::after { display: none; }
    .f-nav__link[aria-current="page"] { background: var(--f-blue-soft); }
    .f-nav__inner { position: relative; }
    .f-nav__actions .f-btn--outline { display: none; }
}

@media (max-width: 620px) {
    .f-cats { grid-template-columns: repeat(2, 1fr); }
    .f-kb__grid,
    .f-faq__grid { grid-template-columns: 1fr; }
    .f-kb__grid--4 { grid-template-columns: 1fr; }
    .f-cta { flex-direction: column; align-items: stretch; text-align: center; }
    .f-cta__actions { justify-content: center; }
    .f-footer__inner { flex-direction: column; align-items: flex-start; }
    .f-footer__links { margin-inline-start: 0; flex-wrap: wrap; }
    /* Columns the eye can skip on a phone, so the table still fits. */
    .f-table th:nth-child(3),
    .f-table td:nth-child(3),
    .f-table th:nth-child(4),
    .f-table td:nth-child(4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .f-cat:hover,
    .f-kb__card:hover { transform: none; }
}

/* ==========================================================================
   Homepage activity — category activity cards + "חם עכשיו" command center.
   Same tokens as the rest of the sheet; activity changes emphasis, never
   position, so the grid is stable between visits.
   ========================================================================== */

.f-acats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

.f-acat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 15px 16px 12px;
    background: var(--f-surface);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius-lg);
    box-shadow: var(--f-shadow);
    transition: border-color .15s, box-shadow .15s, background-color .15s, transform .15s;
}
.f-acat:hover {
    border-color: #b9d0ee;
    background: #fcfdff;
    box-shadow: var(--f-shadow-lift);
    transform: translateY(-2px);
}
/* The whole card is the category link; the thread link sits above it. */
.f-acat__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.f-acat:has(.f-acat__link:focus-visible) { outline: 2px solid var(--f-blue); outline-offset: 2px; }
.f-acat__link:focus-visible { outline: none; }

/* activity tiers: an accent rule, not a different card */
.f-acat--hot { border-color: #f1cfae; box-shadow: inset 0 3px 0 #e2711d, var(--f-shadow); }
.f-acat--active { box-shadow: inset 0 3px 0 var(--f-blue), var(--f-shadow); }
.f-acat--hot:hover { box-shadow: inset 0 3px 0 #e2711d, var(--f-shadow-lift); }
.f-acat--active:hover { box-shadow: inset 0 3px 0 var(--f-blue), var(--f-shadow-lift); }
.f-acat--quiet { background: #fbfcfe; }

.f-acat__head { display: flex; align-items: center; gap: 10px; }
.f-acat__icon {
    flex: none;
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: var(--f-blue-soft);
    color: var(--f-blue);
}
.f-acat--hot .f-acat__icon { background: #fdeee2; color: #c2610f; }
.f-acat--quiet .f-acat__icon { background: var(--f-line-soft); color: var(--f-ink-soft); }

.f-acat__name { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.f-acat__link { color: var(--f-ink); }
.f-acat__link:hover { text-decoration: none; }
.f-acat:hover .f-acat__link { color: var(--f-blue); }

.f-acat__badges { list-style: none; margin: -2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }

.f-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px; font-weight: 700; line-height: 1.6;
    white-space: nowrap;
}
.f-badge--hot { background: #fdeee2; color: #b4570f; }
.f-badge--new { background: var(--f-blue-soft); color: var(--f-blue-dark); }
.f-badge--unanswered { background: #fff4d6; color: #86600a; }
.f-badge--solved { background: #dff3e4; color: #1f7a3d; }

.f-acat__body { display: flex; flex-direction: column; gap: 3px; min-height: 58px; }
.f-acat__thread {
    position: relative; z-index: 1;
    color: var(--f-ink);
    font-size: 14.5px; font-weight: 600; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.f-acat__thread:hover { color: var(--f-blue); }
.f-acat__thread--empty { color: var(--f-blue); font-weight: 600; }
.f-acat--quiet .f-acat__thread { font-weight: 500; color: var(--f-ink-soft); }
.f-acat__meta { font-size: 12.5px; color: var(--f-ink-faint); }

.f-acat__foot {
    margin-top: auto;
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    padding-top: 10px;
    border-top: 1px solid var(--f-line-soft);
    font-size: 12.5px;
}
.f-acat__pulse { display: inline-flex; align-items: center; gap: 5px; color: var(--f-ink-soft); font-weight: 600; }
.f-acat__pulse svg { color: var(--f-blue); }
.f-acat--hot .f-acat__pulse svg { color: #e2711d; }
.f-acat__quiet { color: var(--f-ink-faint); font-weight: 400; }
.f-acat__people { display: inline-flex; padding-inline-start: 6px; }
.f-avatar--xs { width: 22px; height: 22px; font-size: 11px; font-weight: 700; margin-inline-start: -6px; box-shadow: 0 0 0 2px var(--f-surface); }
.f-acat__total { margin-inline-start: auto; color: var(--f-ink-faint); }
.f-acat__go {
    display: inline-flex; align-items: center; gap: 3px;
    color: var(--f-blue); font-weight: 700;
    opacity: 0; transition: opacity .15s;
}
.f-acat__go svg { transition: transform .15s; }
.f-acat:hover .f-acat__go, .f-acat:focus-within .f-acat__go { opacity: 1; }
.f-acat:hover .f-acat__go svg { transform: translateX(-3px); }

/* --- command center ---------------------------------------------------- */

.f-home { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--f-gap); align-items: start; }

.f-cc { overflow: hidden; }
.f-cc__head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; padding: 18px 20px 14px; }
.f-cc__heading { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; }
.f-cc__flame { display: flex; color: #e2711d; }
.f-cc__sub { margin: 2px 0 0; font-size: 13.5px; color: var(--f-ink-soft); }
.f-cc__head .f-section__more { margin-top: 4px; }
.f-cc__fresh {
    margin-inline-start: auto; margin-top: 2px;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border: 0; border-radius: 999px;
    background: var(--f-blue-soft); color: var(--f-blue-dark);
    font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.f-cc__fresh::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--f-blue); }
.f-cc__fresh:hover { background: #d9e8fb; }
.f-cc__fresh + .f-section__more { margin-inline-start: 0; }

.f-cc__today {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px;
    padding: 10px 20px;
    background: var(--f-blue-tint);
    border-block: 1px solid var(--f-line-soft);
}
.f-cc__today-label { font-size: 12.5px; font-weight: 700; color: var(--f-ink-soft); }
.f-cc__today dl { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; }
.f-cc__today dl > div { display: flex; align-items: baseline; gap: 6px; }
.f-cc__today dd { order: -1; margin: 0; font-size: 18px; font-weight: 800; color: var(--f-ink); font-variant-numeric: tabular-nums; transition: color .4s; }
.f-cc__today dd.is-changed { color: var(--f-blue); }
.f-cc__today dt { font-size: 12.5px; color: var(--f-ink-soft); }
.f-cc__today-open dd { color: #86600a; }

.f-cc__tabs {
    display: flex; gap: 2px;
    padding: 0 12px;
    border-bottom: 1px solid var(--f-line);
    overflow-x: auto; scrollbar-width: thin;
}
.f-cc__tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 10px 11px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--f-ink-soft);
    font-size: 14px; font-weight: 600;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.f-cc__tab:hover { color: var(--f-ink); text-decoration: none; }
.f-cc__tab[aria-selected="true"] { color: var(--f-blue); border-bottom-color: var(--f-blue); }
.f-cc__count {
    min-width: 20px; padding: 0 6px;
    border-radius: 999px;
    background: var(--f-line-soft); color: var(--f-ink-soft);
    font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.6;
}
.f-cc__tab[aria-selected="true"] .f-cc__count { background: var(--f-blue-soft); color: var(--f-blue-dark); }

.f-cc__panel.is-entering { animation: f-cc-in .2s ease-out; }
@keyframes f-cc-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.f-cc__list { list-style: none; margin: 0; padding: 0; }
.f-cc__row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--f-line-soft);
    transition: background-color .15s;
}
.f-cc__row:last-child { border-bottom: 0; }
.f-cc__row:hover { background: var(--f-blue-tint); }
.f-cc__main { flex: 1 1 320px; min-width: 0; }
.f-cc__title { display: inline-flex; align-items: flex-start; gap: 5px; color: var(--f-ink); font-size: 15px; font-weight: 600; line-height: 1.45; }
.f-cc__title:hover { color: var(--f-blue); }
.f-cc__hot { display: inline-flex; color: #e2711d; margin-top: 3px; }
.f-cc__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; margin-top: 4px; font-size: 12.5px; color: var(--f-ink-faint); }
.f-cc__stats { display: inline-flex; flex-wrap: wrap; gap: 2px 0; color: var(--f-ink-soft); }
.f-cc__stats > span + span::before { content: "·"; margin-inline: 7px; color: var(--f-ink-faint); }
.f-cc__meta > .f-cc__author + .f-cc__stats::before,
.f-cc__meta > .f-badge + .f-cc__stats::before { content: "·"; margin-inline-end: 7px; color: var(--f-ink-faint); }
.f-cc__stats strong { color: var(--f-ink); }
.f-cc__help { padding: 6px 14px; font-size: 13px; }

.f-cc__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; text-align: center; }
.f-cc__empty strong { font-size: 15.5px; }
.f-cc__empty span { font-size: 13.5px; color: var(--f-ink-faint); }
.f-cc__empty .f-btn { margin-top: 8px; }

@media (max-width: 1180px) {
    .f-acats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .f-home { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .f-acats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
}

@media (max-width: 620px) {
    /* A swipeable strip: every category stays one swipe away without
       pushing the command center a screen and a half down. */
    .f-acats {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 80%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .f-acats::-webkit-scrollbar { display: none; }
    .f-acat { scroll-snap-align: start; }
    .f-acat:hover { transform: none; }
    .f-acat__go { opacity: 1; }
    .f-cc__head { padding: 16px 16px 12px; }
    .f-cc__today { padding: 10px 16px; }
    .f-cc__today dl { gap: 4px 16px; }
    .f-cc__tabs { padding: 0 6px; }
    .f-cc__row { padding: 12px 16px; }
    .f-cc__stats { flex-basis: 100%; }
    .f-cc__meta > .f-cc__author + .f-cc__stats::before,
    .f-cc__meta > .f-badge + .f-cc__stats::before { content: none; }
}

/* --- thread page: accepted solution and the solve control ------------- */
.f-post { scroll-margin-top: 16px; }
.f-post--solution { background: #f3fbf5; box-shadow: inset 3px 0 0 #2f9a57; }
.f-post__solved { margin-inline-start: 4px; }
.f-post__solve { margin: 0; margin-inline-start: auto; }
.f-post__solve .f-btn { padding: 5px 12px; font-size: 13px; }
.f-cc__fresh[hidden] { display: none; }

/* Narrow phones: logo + menu + "דיון חדש" were 28px wider than a 360px
   screen, which made mobile browsers zoom the whole page out. Only the
   spacing tightens; the header's content and look are unchanged. */
@media (max-width: 400px) {
    .f-nav__inner { gap: 12px; padding-inline: 16px; }
    /* Narrow phones: the dashboard link moves into the bell panel's footer. */
    .f-nav__actions .f-nav__me { display: none; }
}

/* ==========================================================================
   Community status — rank, badges, author status, progress, weekly block.
   Quiet by design: small chips, no trophies, no oversized counters.
   ========================================================================== */

.f-rank {
    display: inline-flex; align-items: center;
    padding: 1px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap;
    background: var(--f-line-soft); color: var(--f-ink-soft);
}
.f-rank--l2 { background: #eef3fa; color: #3d5a80; }
.f-rank--l3 { background: var(--f-blue-soft); color: var(--f-blue-dark); }
.f-rank--l4 { background: #e3f1ea; color: #1f6b43; }
.f-rank--l5 { background: #1d6fe0; color: #fff; }
.f-rank--l6 { background: #13488f; color: #fff; }
.f-rank--l7 { background: #17212f; color: #fff; }

.f-bdg {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 6px;
    border: 1px solid var(--f-line); background: var(--f-surface);
    font-size: 12.5px; font-weight: 600; color: var(--f-ink); white-space: nowrap;
    box-shadow: inset 3px 0 0 var(--f-line);
}
.f-bdg--bronze { box-shadow: inset -3px 0 0 #b98a5e; }
.f-bdg--silver { box-shadow: inset -3px 0 0 #9aa6b4; }
.f-bdg--gold { box-shadow: inset -3px 0 0 #c9a227; }
.f-bdg--verified { border-color: #bcd4f3; color: var(--f-blue-dark); background: var(--f-blue-tint); box-shadow: none; }

.f-astatus { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 6px; font-size: 12px; }
.f-astatus a { color: var(--f-blue-dark); font-weight: 600; }
.f-astatus__rep { color: var(--f-ink-faint); }
.f-specialty { display: inline-block; margin-inline-end: 6px; padding: 1px 9px; border-radius: 999px; background: #eef6f1; color: #1f6b43; font-size: 12.5px; font-weight: 600; }
.f-owner-tag { margin-inline-start: 6px; font-size: 11.5px; font-weight: 700; color: var(--f-blue-dark); }

.f-post__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; }
.f-post__tools form { margin: 0; }
.f-post__tools .f-btn { padding: 4px 12px; font-size: 13px; }
.f-post__tools .f-btn[aria-pressed="true"] { background: var(--f-blue-soft); }
.f-helpful-count { font-size: 12.5px; color: var(--f-ink-soft); }

.f-flash { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--f-radius); background: #e8f6ee; color: #1f6b43; font-size: 14px; }
.f-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.f-stack > * { min-width: 0; }
.f-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.f-row form { margin: 0; }
.f-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.f-plainlist { list-style: none; margin: 0; padding: 0; }
.f-plainlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--f-line-soft); }
.f-plainlist li:last-child { border-bottom: 0; }
.f-members__empty { margin: 0; padding: 16px; font-size: 13.5px; color: var(--f-ink-faint); }

/* weekly */
.f-week { padding: 18px 20px; }
.f-week__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.f-week__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 20px; }
.f-week__h { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--f-ink-soft); }
.f-week__empty { margin: 0; color: var(--f-ink-soft); font-size: 14px; max-width: 720px; }
.f-week__verified { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13.5px; color: var(--f-blue-dark); }
.f-lead { list-style: none; margin: 0; padding: 0; }
.f-lead li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.f-lead li + li { border-top: 1px solid var(--f-line-soft); }
.f-lead__n { width: 18px; font-size: 12px; font-weight: 700; color: var(--f-ink-faint); text-align: center; }
.f-lead__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.f-lead__who a { color: var(--f-ink); font-weight: 600; font-size: 14px; }
.f-lead__what { font-size: 12.5px; color: var(--f-ink-soft); }
.f-lead__pts { margin-inline-start: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--f-blue-dark); }
.f-lead__none { margin: 0; font-size: 13px; color: var(--f-ink-faint); }
.f-feed { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.f-feed li { padding: 6px 0; border-bottom: 1px solid var(--f-line-soft); }
.f-feed li:last-child { border-bottom: 0; }
.f-feed li > a:first-child { font-weight: 700; color: var(--f-ink); margin-inline-end: 4px; }
.f-feed__what { color: var(--f-ink-soft); }
.f-feed__time { display: block; font-size: 12px; color: var(--f-ink-faint); }

/* progress */
.f-prog { padding: 18px 20px; }
.f-prog__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; }
.f-prog__title { margin: 0; font-size: 17px; font-weight: 700; }
.f-prog__notif { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--f-blue-soft); }
.f-prog__head .f-section__more { margin-inline-start: auto; }
.f-prog__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.f-prog__rep { margin: 8px 0 6px; font-size: 13.5px; color: var(--f-ink-soft); }
.f-prog__rep strong { font-size: 18px; color: var(--f-ink); font-variant-numeric: tabular-nums; }
.f-prog__bar { height: 6px; border-radius: 999px; background: var(--f-line-soft); overflow: hidden; margin: 6px 0; }
.f-prog__bar i { display: block; height: 100%; background: var(--f-blue); border-radius: inherit; }
.f-prog__next { margin: 6px 0 4px; font-size: 13.5px; }
.f-prog__missing { margin: 0; padding-inline-start: 18px; font-size: 13px; color: var(--f-ink-soft); }
.f-prog__stats { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--f-ink-soft); }
.f-prog__stats li { padding: 3px 0; }
.f-prog__stats strong { display: inline-block; min-width: 22px; color: var(--f-ink); font-variant-numeric: tabular-nums; }
.f-prog__streak { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; font-weight: 600; color: #b4570f; }
.f-prog__streak--past { color: var(--f-ink-soft); font-weight: 400; }
.f-prog__opt { font-weight: 400; color: var(--f-ink-faint); }
.f-prog__goals ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.f-prog__goals li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--f-ink-soft); }
.f-prog__goals li > span:first-child { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--f-line); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.f-prog__goals li.is-done { color: var(--f-ink); }
.f-prog__goals li.is-done > span:first-child { border-color: #2f9a57; color: #2f9a57; }

/* profile & dashboard */
.f-prof { padding: 20px; }
.f-prof__id { display: flex; align-items: center; gap: 14px; }
.f-prof__avatar { width: 56px; height: 56px; font-size: 22px; font-weight: 700; }
.f-prof__name { margin: 0; font-size: 24px; font-weight: 800; }
.f-prof__rank { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--f-ink-soft); }
.f-prof__rank strong { color: var(--f-ink); }
.f-prof__spec { margin: 6px 0 0; font-size: 13.5px; color: var(--f-ink-soft); }
.f-prof__stats { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--f-line-soft); display: flex; flex-wrap: wrap; gap: 8px 28px; }
.f-prof__stats li { display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; color: var(--f-ink-soft); }
.f-prof__stats strong { font-size: 18px; color: var(--f-ink); font-variant-numeric: tabular-nums; }
.f-prof__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.f-me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.f-ladder { list-style: none; margin: 0; padding: 0; }
.f-ladder li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--f-line-soft); opacity: .8; }
.f-ladder li.is-done { opacity: .55; }
.f-ladder li.is-current { opacity: 1; font-weight: 600; }
.f-ladder__you { font-size: 12px; font-weight: 700; color: var(--f-blue); }
.f-streaks { display: grid; gap: 0; margin: 0; }
.f-streaks div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--f-line-soft); font-size: 14px; }
.f-streaks dt { color: var(--f-ink-soft); }
.f-streaks dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.f-streaks .is-minor { font-size: 13px; opacity: .75; }
.f-nextbadges, .f-specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.f-nextbadges li, .f-specs li { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px 0; }
.f-nextbadges .f-bdg { opacity: .65; }
.f-specs li:not(.is-earned) .f-specialty { background: var(--f-line-soft); color: var(--f-ink-soft); }
.f-notifs { list-style: none; margin: 8px 0 0; padding: 0; }
.f-notifs li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.f-notifs li.is-unread { background: var(--f-blue-tint); font-weight: 600; }
.f-history { list-style: none; margin: 0; padding: 0; }
.f-history li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--f-line-soft); font-size: 14px; }
.f-history__pts { font-weight: 800; color: #1f6b43; font-variant-numeric: tabular-nums; direction: ltr; text-align: end; }
.f-history__pts.is-neg { color: #a83246; }
.f-history__what { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.f-history li.is-revoked .f-history__pts { text-decoration: line-through; color: var(--f-ink-faint); }
.f-table tr.is-revoked td { opacity: .5; }

/* ==========================================================================
   Community builds — the most visual part of the forum.
   ========================================================================== */

.f-bhome { padding: 22px 22px 18px; background: var(--f-surface); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg); box-shadow: var(--f-shadow); }
.f-bhome__head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 8px; }
.f-bhome__title { margin: 0; font-size: 22px; font-weight: 800; }
.f-bhome__sub { margin: 2px 0 0; color: var(--f-ink-soft); font-size: 14px; }
.f-bhome__actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.f-bhome__tabs { padding: 0; margin-bottom: 16px; }
.f-bhome__none { color: var(--f-ink-faint); font-size: 14px; padding: 20px 0; }
.f-bempty { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: center; padding: 10px 0; }
.f-bempty .f-bcard__ph { width: 100%; border-radius: var(--f-radius); }
.f-bempty strong { display: block; font-size: 17px; margin-bottom: 4px; }
.f-bempty p { margin: 0 0 12px; color: var(--f-ink-soft); max-width: 560px; }

.f-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.f-bgrid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.f-bcard {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--f-surface); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg);
    overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.f-bcard:hover { border-color: #b9d0ee; box-shadow: var(--f-shadow-lift); transform: translateY(-2px); }
.f-bcard__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--f-blue-tint); }
.f-bcard__media img, .f-bcard__media .f-bcard__ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f-bcard__labels { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.f-bstat {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; line-height: 1.7; white-space: nowrap;
    background: rgba(255, 255, 255, .92); color: var(--f-ink); border: 1px solid var(--f-line);
}
.f-bstat--velto { background: #1d6fe0; color: #fff; border-color: #1d6fe0; letter-spacing: .02em; }
.f-bstat--community { background: #e3f1ea; color: #1f6b43; border-color: #cbe5d6; }
.f-bstat--draft { background: #fff4d6; color: #86600a; border-color: #f2e0ad; }
.f-bstat--complete { background: #eef3fa; color: #3d5a80; }
.f-bstat--active { background: var(--f-blue-soft); color: var(--f-blue-dark); border-color: #cfe0f7; }
.f-bcard__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px; flex: 1; }
.f-bcard__title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; }
.f-bcard__title a { color: var(--f-ink); }
.f-bcard:hover .f-bcard__title a { color: var(--f-blue); }
.f-bcard__owner { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.f-bcard__owner > a { color: var(--f-ink-soft); font-weight: 600; }
.f-bcard__vtype { color: var(--f-ink-faint); font-size: 12.5px; }
.f-bcard__specs { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.f-bcard__specs li { padding: 2px 8px; border-radius: 6px; background: var(--f-bg); border: 1px solid var(--f-line-soft); font-size: 12.5px; font-weight: 600; color: var(--f-ink); direction: ltr; unicode-bidi: isolate; }
.f-bcard__nospec { margin: 0; font-size: 12.5px; color: var(--f-ink-faint); }
.f-bcard__foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--f-line-soft); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--f-ink-soft); }
.f-bcard__foot > span { display: inline-flex; align-items: center; gap: 4px; }
.f-bcard__time { margin-inline-start: auto; color: var(--f-ink-faint); }
.f-bcard__compare { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--f-ink-soft); cursor: pointer; }

.f-page-head--row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; }
.f-tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.f-tagchip-wrap { display: inline-flex; align-items: center; border-radius: 999px; }
.f-tagchip {
    display: inline-flex; align-items: center; padding: 5px 12px;
    border-radius: 999px; border: 1px solid var(--f-line); background: var(--f-surface);
    color: var(--f-ink-soft); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.f-tagchip:hover { text-decoration: none; border-color: #b9d0ee; color: var(--f-ink); }
.f-tagchip.is-on { background: var(--f-blue); border-color: var(--f-blue); color: #fff; }
.f-tagchip-wrap .f-tagchip { border-start-end-radius: 0; border-end-end-radius: 0; }
.f-tagfollow { margin: 0; }
.f-tagfollow button {
    height: 100%; min-height: 31px; padding: 0 9px;
    border: 1px solid var(--f-line); border-inline-start: 0; border-radius: 0 999px 999px 0;
    border-start-start-radius: 0; border-end-start-radius: 0; border-start-end-radius: 999px; border-end-end-radius: 999px;
    background: var(--f-surface); color: var(--f-ink-faint); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.f-tagfollow button[aria-pressed="true"] { background: var(--f-blue-soft); color: var(--f-blue-dark); }
.f-btag { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--f-blue-soft); color: var(--f-blue-dark); font-size: 12px; font-weight: 700; margin-inline-end: 4px; }

.f-bfilter { margin-bottom: 14px; }
.f-bfilter summary { padding: 12px 16px; font-weight: 700; cursor: pointer; }
.f-bfilter__form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; padding: 0 16px 16px; align-items: end; }
.f-bfilter__form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--f-ink-soft); }
.f-bfilter__form .f-check { display: inline-flex; }
.f-bfilter__actions { display: flex; gap: 8px; }
.f-bcount { font-size: 13.5px; color: var(--f-ink-faint); margin: 0 0 10px; }
.f-comparebar {
    position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 5;
    margin: 16px auto 0; width: fit-content; max-width: 100%;
    display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; padding-inline-start: 16px;
    background: var(--f-ink); color: #fff; border-radius: 999px; box-shadow: var(--f-shadow-lift);
}
.f-comparebar[hidden] { display: none; }
.f-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; font-size: 14px; color: var(--f-ink-soft); }

/* build page */
.f-bhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; }
.f-bhead__main { flex: 1 1 420px; min-width: 0; }
.f-bhead__labels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.f-bhead__owner { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 14px; }
.f-bhead__owner a { color: var(--f-ink); }
.f-bhead__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.f-bhead__actions form { margin: 0; }
.f-bhead__meta { margin: 10px 0 0; font-size: 13px; color: var(--f-ink-faint); }
.f-bcount-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--f-line); border-radius: var(--f-radius); font-weight: 600; background: var(--f-surface); }
.f-bcomplete { padding: 14px 18px; margin-bottom: 16px; display: grid; gap: 6px; }
.f-bcomplete p { margin: 0; }
.f-blayout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.f-blayout__main, .f-blayout__side { display: grid; gap: 16px; min-width: 0; }
.f-bsec { padding: 18px 20px; }
.f-bsec__title { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.f-bgallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.f-bgallery__item { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--f-blue-tint); }
.f-bgallery__item.is-lead { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.f-bgallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-bgallery__empty svg { width: 100%; max-height: 280px; border-radius: 10px; }
.f-bdesc, .f-bprose { margin: 14px 0 0; line-height: 1.75; }
.f-bprose { margin: 0; }
.f-bspec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.f-bspec__group h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--f-blue-dark); }
.f-bspec__group dl { margin: 0; }
.f-bspec__group dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--f-line-soft); font-size: 14px; }
.f-bspec__group dl > div.is-long { display: block; }
.f-bspec__group dt { color: var(--f-ink-soft); }
.f-bspec__group dd { margin: 0; text-align: end; }
.f-bspec__group .is-long dd { text-align: start; }
.f-bspec__group .is-long p { margin: 4px 0; white-space: pre-line; }
.f-spec__val { font-weight: 700; }
.f-spec__unit { font-weight: 400; color: var(--f-ink-soft); font-size: 12.5px; }
.f-spec__none { color: var(--f-ink-faint); font-size: 13px; }
.f-src { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; vertical-align: 1px; background: var(--f-line-soft); color: var(--f-ink-faint); }
.f-src--community { background: #e3f1ea; color: #1f6b43; }
.f-src--velto { background: var(--f-blue); color: #fff; }
.f-src--manufacturer { background: #17212f; color: #fff; }
.f-blinks { margin: 0; padding-inline-start: 18px; }
.f-timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--f-line); }
.f-timeline li { position: relative; padding: 0 16px 16px; padding-inline-end: 0; font-size: 14px; }
.f-timeline li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--f-surface); border: 2px solid var(--f-blue); }
.f-timeline__date { display: inline-block; font-weight: 800; font-variant-numeric: tabular-nums; margin-inline-end: 6px; }
.f-timeline__kind { font-size: 12px; color: var(--f-ink-faint); }
.f-timeline strong { display: block; margin-top: 2px; }
.f-timeline__val { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 6px; background: var(--f-blue-tint); font-size: 12.5px; }
.f-timeline p { margin: 4px 0 0; color: var(--f-ink-soft); }
.f-bupdate-form { margin-bottom: 14px; }
.f-bupdate-form summary { cursor: pointer; font-weight: 700; color: var(--f-blue); padding: 4px 0; }
.f-bupdate-form .f-form { padding: 10px 0 0; }
.f-bupdate-form__value { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.f-bcomment-form { padding: 14px 0 0; }
.f-admin-box { border-color: #f2e0ad; }
.f-admin-src { justify-content: space-between; padding: 4px 0; font-size: 13px; }
.f-admin-src .f-select { width: auto; }

/* wizard */
.f-wsteps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.f-wsteps li > a, .f-wsteps li > span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--f-ink-soft); background: var(--f-surface); border: 1px solid var(--f-line); }
.f-wsteps li span > span, .f-wsteps li a > span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--f-line-soft); font-size: 11px; }
.f-wsteps li.is-on > span { background: var(--f-blue); color: #fff; border-color: var(--f-blue); }
.f-wsteps li.is-on span > span { background: rgba(255,255,255,.25); }
.f-wsteps li.is-done a { color: var(--f-blue-dark); }
.f-wizard { padding: 20px; }
.f-wizard .f-form { padding: 0; }
.f-wizard__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.f-wizard__grid .f-field:has(textarea) { grid-column: 1 / -1; }
.f-wizard__nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.f-wizard__nav form { margin: 0; }
.f-wmedia { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.f-wmedia li { display: grid; gap: 6px; justify-items: start; }
.f-wmedia img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.f-wmedia form { margin: 0; }

/* compare */
.f-compare-wrap { overflow-x: auto; }
.f-compare { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.f-compare th, .f-compare td { padding: 10px 14px; border-bottom: 1px solid var(--f-line-soft); text-align: start; vertical-align: top; }
.f-compare thead th { vertical-align: bottom; }
.f-compare thead a { display: grid; gap: 6px; color: var(--f-ink); font-weight: 700; }
.f-compare thead img { width: 100%; max-width: 200px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.f-compare tbody th { color: var(--f-ink-soft); font-weight: 600; white-space: nowrap; }
.f-compare tr.is-diff td { background: #fbfcff; }
.f-compare tr.is-diff th { color: var(--f-ink); }
.f-compare__long { margin: 0 0 4px; font-size: 13px; }

/* leaderboard / admin */
.f-lb { padding: 0 0 12px; }
.f-lb .f-cc__tabs { padding: 0 12px; }
.f-lb__boards { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px 0; margin-bottom: 10px; }
.f-lb__explain { padding: 0 16px; }
.f-lb .f-lead { padding: 0 16px; }
.f-lb .f-lead li { padding: 10px 0; }
.f-admin h3 { margin-top: 18px; }
.f-input--num { width: 84px; }

@media (max-width: 1180px) {
    .f-bgrid--home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .f-week__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .f-week__feed { grid-column: 1 / -1; }
    .f-blayout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
    .f-blayout { grid-template-columns: minmax(0, 1fr); }
    .f-prog__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .f-prog__rank { grid-column: 1 / -1; }
    .f-bfilter__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .f-me-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
    /* Build cards: one swipeable row on the homepage, one column elsewhere. */
    .f-bgrid.f-bgrid--home { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
    .f-bgrid--home::-webkit-scrollbar { display: none; }
    .f-bgrid--home .f-bcard { scroll-snap-align: start; }
    .f-bgrid { grid-template-columns: minmax(0, 1fr); }
    .f-bcard:hover { transform: none; }
    .f-bhome { padding: 16px 14px; }
    .f-bhome__actions { margin-inline-start: 0; }
    .f-bempty { grid-template-columns: minmax(0, 1fr); }
    .f-week__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .f-prog__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .f-prof__badges { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .f-bfilter__form { grid-template-columns: minmax(0, 1fr); }
    .f-bspec { grid-template-columns: minmax(0, 1fr); }
    .f-bgallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .f-wizard__grid { grid-template-columns: minmax(0, 1fr); }
    .f-history li { grid-template-columns: 44px minmax(0, 1fr); }
    .f-history li > .f-hint:last-child { grid-column: 2; }
    .f-tagbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
}

/* ==========================================================================
   Notifications — header bell, dropdown, notification cards, status card.
   ========================================================================== */

.f-bell { position: relative; }
.f-bell__btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--f-radius);
    border: 1px solid var(--f-line); background: var(--f-surface); color: var(--f-ink-soft); cursor: pointer;
}
.f-bell__btn:hover, .f-bell__btn[aria-expanded="true"] { color: var(--f-blue); border-color: #b9d0ee; }
.f-bell__count {
    position: absolute; inset-block-start: -6px; inset-inline-end: -6px;
    min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    background: #d6453d; color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
    box-shadow: 0 0 0 2px var(--f-surface);
}
.f-bell__count[hidden] { display: none; }
.f-bell__panel {
    position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0; z-index: 30;
    width: 380px; max-height: min(560px, 75vh); display: flex; flex-direction: column;
    background: var(--f-surface); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg);
    box-shadow: 0 16px 40px -12px rgba(23, 33, 47, .28); overflow: hidden;
}
.f-bell__panel[hidden] { display: none; }
.f-bell__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--f-line-soft); }
.f-bell__head strong { font-size: 15px; }
.f-bell__readall { margin-inline-start: auto; border: 0; background: none; color: var(--f-blue); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.f-bell__close { display: none; border: 0; background: none; color: var(--f-ink-soft); cursor: pointer; transform: rotate(45deg); }
.f-bell__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.f-bell__loading, .f-bell__empty { padding: 28px 16px; text-align: center; color: var(--f-ink-faint); font-size: 14px; }
.f-bell__foot { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--f-line-soft); font-size: 13.5px; font-weight: 600; }
.f-nav__me { display: inline-flex; border-radius: 50%; }
.f-nav__me .f-avatar { width: 36px; height: 36px; font-weight: 700; }

.f-nlist { list-style: none; margin: 0; padding: 0; }
.f-ncard { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--f-line-soft); }
.f-ncard:last-child { border-bottom: 0; }
.f-ncard.is-unread { background: var(--f-blue-tint); }
.f-ncard.is-unread::before { content: ""; position: absolute; inset-block: 12px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--f-blue); }
.f-ncard--high.is-unread::before { background: #d6453d; }
.f-ncard__icon { flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--f-line-soft); color: var(--f-ink-soft); }
.f-ncard__icon--check { background: #e3f1ea; color: #1f7a3d; }
.f-ncard__icon--message { background: var(--f-blue-soft); color: var(--f-blue); }
.f-ncard__icon--flame { background: #fdeee2; color: #c2610f; }
.f-ncard__icon--heart { background: #fde5e8; color: #a83246; }
.f-ncard__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; color: var(--f-ink); }
.f-ncard__body:hover { text-decoration: none; }
.f-ncard__body:hover .f-ncard__title { color: var(--f-blue); }
.f-ncard__title { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.f-ncard:not(.is-unread) .f-ncard__title { font-weight: 500; }
.f-ncard__subject { font-size: 13.5px; color: var(--f-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-ncard__meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--f-ink-faint); }
.f-ncard__pts { color: #1f7a3d; font-weight: 700; }
.f-ncard__read { margin: 0; }
.f-ncard__read button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; }
.f-ncard__read button span { width: 9px; height: 9px; border-radius: 50%; background: var(--f-blue); }
.f-ncard__read button:hover { background: var(--f-blue-soft); }
.f-bell__list .f-ncard { padding: 11px 14px; }

.f-prio { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--f-line-soft); color: var(--f-ink-soft); }
.f-prio--high { background: #fde5e3; color: #a3322b; }
.f-prio--low { background: transparent; color: var(--f-ink-faint); }
.f-prefs td, .f-prefs th { text-align: start; }
.f-prefs td:nth-child(n+3) { text-align: center; }

.f-follow-form { display: inline-flex; margin: 0; }
.f-follow {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    border: 1px solid var(--f-line); border-radius: 999px; background: var(--f-surface);
    color: var(--f-ink-soft); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.f-follow:hover { border-color: #b9d0ee; color: var(--f-blue); }
.f-follow.is-on { background: var(--f-blue-soft); border-color: #cfe0f7; color: var(--f-blue-dark); }
.f-page-head__follow { margin: 8px 0 4px; }

.f-home__side { display: grid; gap: var(--f-gap); align-content: start; min-width: 0; }
.f-status { padding: 16px 18px; display: grid; gap: 6px; }
.f-status__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.f-status__title { margin: 0; font-size: 15px; font-weight: 700; }
.f-status__head .f-prog__notif { margin-inline-start: auto; }
.f-status__rank, .f-status__rep { margin: 0; font-size: 13.5px; color: var(--f-ink-soft); }
.f-status__rep strong { font-size: 20px; color: var(--f-ink); font-variant-numeric: tabular-nums; }
.f-status__specs { display: flex; flex-wrap: wrap; gap: 4px 0; }
.f-status .f-section__more { margin-inline-start: 0; }

.f-prof__stats li.is-key strong { color: var(--f-blue-dark); }
.f-prof__activity { margin: 8px 0 0; font-size: 12.5px; color: var(--f-ink-faint); }
.f-prof__spec .f-specialty { margin-bottom: 4px; }
.f-digest ul { margin: 0 0 8px; padding-inline-start: 18px; line-height: 1.8; }
.f-week__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.f-week__feed { grid-column: 1 / -1; }
.f-nlist--compact .f-ncard { padding: 10px 0; }
.f-nlist--compact .f-ncard.is-unread::before { display: none; }

@media (max-width: 1180px) { .f-week__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
    .f-week__grid { grid-template-columns: minmax(0, 1fr); }
    /* The dropdown becomes a full-screen panel on phones. */
    .f-bell__panel {
        position: fixed; inset: 0; width: auto; max-height: none; border-radius: 0; border: 0;
        padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .f-bell__close { display: inline-flex; }
    .f-bell__head { padding: 14px 16px; }
    /* Signed in (bell present): the label stays for screen readers only. */
    .f-nav__actions:has(.f-bell) .f-btn--primary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .f-nav__actions:has(.f-bell) .f-btn--primary { padding: 9px 11px; }
}

/* ==========================================================================
   Badge cabinet (/forum/me#badges) — hexagon medallions, level tracks.
   Tiers: base (green), bronze, silver, gold, verified (blue), locked (grey).
   ========================================================================== */

.f-cabinet { padding: 22px 22px 24px; scroll-margin-top: 16px; }
.f-cabinet__head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 18px; }
.f-cabinet__head .f-bsec__title { margin-bottom: 2px; }
.f-cabinet__sum { margin: 0; font-size: 13.5px; color: var(--f-ink-soft); }
.f-cabinet__sum b { color: var(--f-ink); font-size: 15px; }
.f-cabinet__filter { margin-inline-start: auto; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--f-line-soft); }
.f-cabinet__filter[hidden] { display: none; }
.f-cabinet__filter button {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 0; border-radius: 999px;
    background: none; color: var(--f-ink-soft); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.f-cabinet__filter button span { min-width: 18px; padding: 0 5px; border-radius: 999px; background: rgba(23, 33, 47, .08); font-size: 11.5px; text-align: center; }
.f-cabinet__filter button[aria-pressed="true"] { background: var(--f-surface); color: var(--f-ink); box-shadow: 0 1px 3px rgba(23, 33, 47, .12); }
.f-cabinet__empty { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--f-blue-tint); color: var(--f-ink-soft); font-size: 14px; }
.f-cabinet__none { margin: 8px 0 0; color: var(--f-ink-faint); font-size: 14px; }

.f-cabinet__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

.f-medal-card {
    display: flex; align-items: flex-start; gap: 14px; padding: 16px; min-width: 0;
    border: 1px solid var(--f-line); border-radius: 14px; background: var(--f-surface);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.f-medal-card:hover { border-color: #c9d9ee; box-shadow: var(--f-shadow-lift); transform: translateY(-1px); }
.f-medal-card--progress { background: #fbfcfe; }
.f-medal-card[hidden] { display: none; }
.f-medal-card__body { min-width: 0; flex: 1; }
.f-medal-card__name { margin: 2px 0 3px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.f-medal-card--progress .f-medal-card__name { color: var(--f-ink-soft); }
.f-medal-card__desc { margin: 0; font-size: 13px; color: var(--f-ink-soft); line-height: 1.5; }
.f-medal-card__hint { margin: 10px 0 0; font-size: 12.5px; color: var(--f-ink-faint); }
.f-medal-card__date { display: flex; align-items: center; gap: 5px; margin: 10px 0 0; font-size: 12px; font-weight: 600; color: #1f7a3d; }
.f-medal-card__progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.f-medal-card__count { font-size: 12px; color: var(--f-ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.f-medal-card__count b { color: var(--f-ink); font-size: 13px; }
.f-medal-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--f-line-soft); overflow: hidden; min-width: 60px; }
.f-medal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5fb07f, #1f7a3d); }
[dir="rtl"] .f-medal-bar i { background: linear-gradient(270deg, #5fb07f, #1f7a3d); }

/* the medallion */
.f-medal { position: relative; flex: none; width: 60px; height: 66px; --m-a: #e3f1ea; --m-b: #bfe0cc; --m-ink: #1f6b43; --m-ring: #8cc7a3; }
.f-medal__hex {
    position: absolute; inset: 0; display: grid; place-items: center; color: var(--m-ink);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: var(--m-ring);
}
.f-medal__hex::before {
    content: ""; position: absolute; inset: 3px;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: linear-gradient(160deg, var(--m-a), var(--m-b));
}
.f-medal__hex svg { position: relative; }
.f-medal--bronze { --m-a: #f7e3cf; --m-b: #e2b58a; --m-ink: #7a4a1d; --m-ring: #b98a5e; }
.f-medal--silver { --m-a: #f1f4f7; --m-b: #cfd6de; --m-ink: #46525f; --m-ring: #9aa6b4; }
.f-medal--gold { --m-a: #fdf3cf; --m-b: #ecd07a; --m-ink: #6d5409; --m-ring: #c9a227; }
.f-medal--verified { --m-a: #e3eefc; --m-b: #b9d3f6; --m-ink: #13488f; --m-ring: #5f95e0; }
.f-medal--locked { --m-a: #f4f6f8; --m-b: #e7ebef; --m-ink: #9aa6b4; --m-ring: #dde3ea; }
.f-medal__lvl, .f-medal__lock {
    position: absolute; inset-block-end: -2px; inset-inline-end: -4px;
    min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
    display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1;
    background: var(--f-surface); color: var(--m-ink); box-shadow: 0 0 0 2px var(--m-ring);
}
.f-medal__lock { color: #8a96a4; box-shadow: 0 0 0 1.5px #d5dce4; }

/* level steps I · II · III */
.f-medal-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; align-items: center; }
.f-medal-steps li { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 34px; position: relative; }
.f-medal-steps li + li { margin-inline-start: 14px; }
.f-medal-steps li + li::before { content: ""; position: absolute; top: 11px; inset-inline-end: calc(100% - 6px); width: 22px; height: 2px; background: var(--f-line); }
.f-medal-steps li.is-on + li.is-on::before { background: #8cc7a3; }
.f-medal-steps span {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
    font-size: 10.5px; font-weight: 800; background: var(--f-line-soft); color: var(--f-ink-faint); border: 1.5px solid var(--f-line);
}
.f-medal-steps small { font-size: 10.5px; color: var(--f-ink-faint); font-variant-numeric: tabular-nums; }
.f-medal-steps li.is-on span { color: #fff; border-color: transparent; background: #3f9a67; }
.f-medal-steps li.is-on.f-medal-steps--bronze span { background: #b98a5e; }
.f-medal-steps li.is-on.f-medal-steps--silver span { background: #8995a3; }
.f-medal-steps li.is-on.f-medal-steps--gold span { background: #c9a227; }

/* compact chip (profile header, lists): icon + tier edge */
.f-bdg { gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; box-shadow: none; }
.f-bdg__ico { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e3f1ea; color: #1f6b43; }
.f-bdg--bronze { border-color: #e2c3a3; } .f-bdg--bronze .f-bdg__ico { background: #f7e3cf; color: #7a4a1d; }
.f-bdg--silver { border-color: #cfd6de; } .f-bdg--silver .f-bdg__ico { background: #eef1f4; color: #46525f; }
.f-bdg--gold { border-color: #e8d28a; } .f-bdg--gold .f-bdg__ico { background: #fdf3cf; color: #6d5409; }
.f-bdg--verified .f-bdg__ico { background: #d9e8fb; color: #13488f; }

@media (max-width: 620px) {
    .f-cabinet { padding: 16px 14px 18px; }
    .f-cabinet__filter { margin-inline-start: 0; width: 100%; }
    .f-cabinet__filter button { flex: 1; justify-content: center; }
    .f-cabinet__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .f-medal-card { padding: 14px; }
    .f-medal-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .f-medal-card { transition: none; } }

/* --- build wizard (4 steps) ---------------------------------------------- */
.f-wizard-wrap { max-width: 760px; }
.f-wizard { padding: 24px; }
.f-wizard__lead { margin: -4px 0 4px; }
.f-textarea--short { min-height: 88px; }
.f-wizard__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f-wsteps { gap: 6px; }
.f-wsteps li.is-done a span { background: #dff3e4; color: #1f7a3d; }
.f-chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.f-chips legend { width: 100%; margin-bottom: 6px; }
.f-chip { position: relative; cursor: pointer; }
.f-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.f-chip span { display: inline-block; padding: 7px 14px; border: 1px solid var(--f-line); border-radius: 999px; background: var(--f-surface); font-size: 14px; font-weight: 600; color: var(--f-ink-soft); }
.f-chip input:checked + span { background: var(--f-blue-soft); border-color: #9fc1ee; color: var(--f-blue-dark); }
.f-chip input:focus-visible + span { outline: 2px solid var(--f-blue); outline-offset: 2px; }
.f-wmore { border-top: 1px solid var(--f-line-soft); padding-top: 10px; }
.f-wmore summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--f-blue); padding: 2px 0; }
.f-wmore[open] summary { margin-bottom: 10px; }
.f-wmore .f-field + .f-field { margin-top: 10px; }
.f-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 28px 16px; border: 2px dashed #c9d9ee; border-radius: 14px; background: var(--f-blue-tint);
    text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.f-drop:hover, .f-drop:focus-within { border-color: var(--f-blue); background: var(--f-blue-soft); }
.f-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.f-drop__icon { color: var(--f-blue); }
.f-drop strong { font-size: 15px; }
.f-wmedia__tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.f-link-btn { border: 0; background: none; padding: 0; color: var(--f-blue); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.f-link-btn:hover { text-decoration: underline; }
.f-link-btn--danger { color: #a3322b; }
.f-wpublish { margin-top: 6px; padding: 14px 16px; border-radius: 12px; background: var(--f-bg); border: 1px solid var(--f-line-soft); }
.f-wpublish__status strong { font-size: 14px; }
.f-wpublish__need { margin: 6px 0 0; color: #a3322b; font-size: 13.5px; font-weight: 600; }
.f-wizard__nav { justify-content: flex-start; align-items: center; margin-top: 16px; }
.f-wizard__nav .f-btn--primary { margin-inline-start: auto; }
.f-wizard__nav .f-btn[disabled] { opacity: .5; cursor: not-allowed; }
.f-wizard__unpub { margin: 12px 0 0; text-align: end; }
@media (max-width: 620px) {
    .f-wizard { padding: 18px 16px; }
    .f-wizard__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .f-wizard__nav { position: sticky; bottom: 0; margin: 16px -16px -18px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--f-surface); border-top: 1px solid var(--f-line-soft); border-radius: 0 0 14px 14px; }
    .f-wsteps li > a, .f-wsteps li > span { padding: 6px 10px; font-size: 12.5px; }
    /* Phones: only the current step keeps its label, so all four fit. */
    .f-wsteps li:not(.is-on) em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .f-wsteps li.is-on { flex: 1; }
    .f-wizard__nav { flex-wrap: wrap; }
    .f-wizard__nav .f-btn--primary { order: -1; flex-basis: 100%; margin-inline-start: 0; }
    .f-wizard__nav .f-btn--outline { margin-inline-start: auto; }
}
.f-wsteps em { font-style: normal; }
.f-wizard__grid { align-items: end; }

.f-wizard__sub { margin: 6px 0 -4px; font-size: 14px; font-weight: 700; color: var(--f-ink-soft); }
.f-wvideo { padding-top: 12px; border-top: 1px solid var(--f-line-soft); }
.f-wvideo .f-row { flex-wrap: nowrap; }
.f-wvideo .f-input { flex: 1; min-width: 0; }

/* --- progress: every missing requirement is an action ------------------ */
.f-todo { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 8px; }
.f-todo li { display: grid; gap: 1px; padding: 9px 12px; border-radius: 10px; background: var(--f-bg); border: 1px solid var(--f-line-soft); font-size: 13.5px; }
.f-todo li strong { color: var(--f-ink); font-weight: 700; }
.f-todo li span { color: var(--f-ink-soft); font-size: 12.5px; line-height: 1.5; }
.f-todo li a { justify-self: start; margin-top: 3px; font-size: 13px; font-weight: 700; }
.f-todo--compact li { padding: 6px 12px; }
.f-todo--compact .f-todo__go { background: none; border: 0; padding: 0 2px; }
.f-prog__goals li { align-items: flex-start; }
.f-prog__goals li > span:first-child { margin-top: 3px; }
.f-goal { display: grid; gap: 1px; }
.f-goal small { font-size: 12px; color: var(--f-ink-faint); line-height: 1.5; }
.f-goal small a { font-weight: 700; }

/* --- "you helped" pop-up -------------------------------------------------- */
.f-celebrate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(23, 33, 47, .45); animation: f-cel-fade .2s ease-out; }
.f-celebrate[hidden] { display: none; }
.f-celebrate__card { width: min(420px, 100%); padding: 28px 24px 22px; border-radius: 18px; background: var(--f-surface); text-align: center; box-shadow: 0 24px 60px -20px rgba(23, 33, 47, .45); animation: f-cel-pop .25s ease-out; }
.f-celebrate__icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: #dff3e4; color: #1f7a3d; box-shadow: 0 0 0 8px #f0faf3; }
.f-celebrate__card h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; }
.f-celebrate__card p { margin: 0 0 10px; color: var(--f-ink-soft); font-size: 14.5px; line-height: 1.6; }
.f-celebrate__card p a { font-weight: 700; }
.f-celebrate__tick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #f0faf3; color: #1f7a3d !important; font-size: 12.5px !important; font-weight: 600; }
.f-celebrate__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.f-celebrate__actions .f-btn { width: 100%; }
body.f-celebrate-open { overflow: hidden; }
@keyframes f-cel-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes f-cel-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
