/* Italian Language Week campaign — resources/views/frontend/italian-week/*. Loaded only on the
   campaign pages; uses the site's tokens (site.css). No images: the tricolore and medals are CSS. */

.iw-flag { height: 6px; background: linear-gradient(90deg, #1b8a4c 0 33.33%, #fff 33.33% 66.66%, var(--red) 66.66%); }

.iw-hero { background: var(--green-deep); color: #fff; position: relative; overflow: hidden; }
.iw-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 194, 122, .22), transparent 70%); pointer-events: none; }
.iw-hero .wrap { padding-top: 28px; padding-bottom: 32px; position: relative; z-index: 1; }
.iw-hero h1 { font-size: clamp(32px, 7vw, 56px); line-height: 1.05; margin: 10px 0 12px; }
.iw-hero h1 em { color: #e8c27a; font-style: italic; }
.iw-hero p { color: #c9d8ce; font-size: 18px; max-width: 640px; margin: 0 0 20px; }
.iw-hero .btn--outline { color: #fff; border-color: rgba(255, 255, 255, .5); background: transparent; }
.iw-hero .btn--outline:hover { border-color: #fff; color: #fff; }
.iw-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.iw-invited { display: inline-flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px; padding: 6px 14px 6px 6px; font-weight: 600; margin-bottom: 6px; }
.iw-invited__av { width: 30px; height: 30px; border-radius: 50%; background: #e8c27a; color: var(--green-deep); display: grid; place-items: center; font-weight: 700; }
.iw-phase { margin-top: 18px; font-size: 14px; color: #e8c27a; font-weight: 600; letter-spacing: .02em; }

.iw-sec { padding: 32px 0 8px; }
.iw-sec h2 { font-size: clamp(26px, 5vw, 36px); margin: 4px 0 14px; }

.iw-steps { display: grid; gap: 12px; grid-template-columns: 1fr; counter-reset: step; }
.iw-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 16px 64px; position: relative; }
.iw-step::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 16px; width: 34px; height: 34px;
    border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; display: grid; place-items: center; }
.iw-step__t { font-weight: 700; font-size: 17px; }
.iw-step p { margin: 4px 0 0; color: var(--ink-soft); }

/* Tier medals */
.iw-medal { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 700; font-size: 13px;
    color: #3d2c00; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .12); flex: none; }
.iw-medal--sm { width: 26px; height: 26px; font-size: 11px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.iw-medal--gold { background: radial-gradient(circle at 35% 30%, #fff3c4, #e8b931 55%, #b8860b); }
.iw-medal--silver { background: radial-gradient(circle at 35% 30%, #ffffff, #c9ced6 55%, #8e959f); color: #2e3338; }
.iw-medal--bronze { background: radial-gradient(circle at 35% 30%, #ffe0c2, #cd7f32 55%, #8a5222); color: #3a1f06; }
.iw-medal--none { background: var(--line); color: var(--ink-muted); box-shadow: none; }

.iw-tiers { display: grid; gap: 12px; grid-template-columns: 1fr; }
.iw-tiercard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.iw-tiercard h3 { margin: 0 0 10px; font-size: 18px; }
.iw-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.iw-ladder li { display: flex; align-items: center; gap: 12px; }
.iw-ladder b { display: block; }
.iw-ladder span.muted { font-size: 14px; }

.iw-prizes { display: grid; gap: 12px; grid-template-columns: 1fr; }
.iw-prize { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.iw-prize--first { border: 2px solid var(--gold-line); background: var(--gold-soft); }
.iw-prize__place { font-family: var(--serif); font-size: 28px; line-height: 1; }
.iw-prize__rows { display: grid; gap: 6px; margin-top: 12px; }
.iw-prize__row { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.iw-prize__row .amt { margin-left: auto; font-family: var(--serif); font-size: 24px; color: var(--green); font-weight: 400; }
.iw-note { background: var(--amber-bg); border: 1px solid var(--gold-line); border-radius: 10px; padding: 12px 14px; color: var(--amber-ink); font-size: 15px; margin-top: 12px; }

.iw-rules { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.iw-rules li { margin: 4px 0; }

/* Leaderboard */
.iw-board { max-width: 760px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.iw-board__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); }
.iw-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.iw-row:last-child { border-bottom: 0; }
.iw-row__rank { font-weight: 700; color: var(--ink-muted); text-align: center; }
.iw-row--top .iw-row__rank { color: var(--gold); font-family: var(--serif); font-size: 22px; font-weight: 400; }
.iw-row__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.iw-row__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iw-row__score { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.iw-row__prize { display: block; font-size: 12px; font-weight: 600; color: var(--green); }
.iw-row--me { background: var(--green-soft); }
.iw-you { font-size: 11px; font-weight: 700; background: var(--green); color: #fff; border-radius: 999px; padding: 1px 7px; }
.iw-empty { padding: 24px 16px; text-align: center; color: var(--ink-muted); }

/* My Italian Week */
.iw-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.iw-card h2 { font-size: 24px; margin: 0 0 10px; }
.iw-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.iw-link input { flex: 1 1 220px; min-width: 0; min-height: 52px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 0 14px; font: inherit; font-weight: 600; background: var(--bg); color: var(--ink); }
.iw-link .btn { flex: 0 0 auto; }
.iw-bar { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.iw-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #2f8f55); border-radius: 999px; transition: width .4s; }
.iw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.iw-stat { background: var(--bg); border-radius: 10px; padding: 12px; text-align: center; }
.iw-stat b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.1; color: var(--green); }
.iw-stat span { font-size: 13px; color: var(--ink-muted); }
.iw-friends { list-style: none; margin: 0; padding: 0; }
.iw-friends li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.iw-friends li:last-child { border-bottom: 0; }
.iw-tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.iw-tag--ok { background: var(--green-soft); color: var(--green); }
.iw-tag--wait { background: var(--amber-bg); color: var(--amber-ink); }
.iw-tag--void { background: var(--line); color: var(--ink-muted); }
.iw-choice { display: grid; gap: 12px; grid-template-columns: 1fr; }

@media (min-width: 720px) {
    .iw-steps { grid-template-columns: repeat(2, 1fr); }
    .iw-tiers { grid-template-columns: repeat(2, 1fr); }
    .iw-prizes { grid-template-columns: 1.4fr 1fr 1fr; }
    .iw-choice { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
    .iw-steps { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .iw-bar > span { transition: none; }
}

/* v2 (2026-10-15): board meta line, checklist, red scholarship clause */
.iw-row__who { flex-wrap: wrap; }
.iw-row__meta { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.iw-check { list-style: none; margin: 0; padding: 0; }
.iw-check li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.iw-check li:last-child { border-bottom: 0; }
.iw-check li > span:first-child { flex: none; width: 22px; text-align: center; font-weight: 700; color: var(--ink-muted); }
.iw-check li.ok > span:first-child { color: var(--green); }
.iw-red { color: #b3261e; font-weight: 700; }

/* Hall of fame */
.iw-hall-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.iw-hall-champ { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.iw-hall-champ__t { font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.iw-hall-podium { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.iw-hall-podium li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.iw-hall-medal { font-size: 20px; }
.iw-hall-score { font-weight: 800; color: var(--green); }

/* Engagement badges (no prizes — THE ONE RULE) */
.iw-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.iw-badge { border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 14px; background: #f1efe9; color: var(--ink-muted); opacity: .6; }
.iw-badge.is-on { background: var(--gold-soft); color: var(--gold-ink); opacity: 1; box-shadow: inset 0 0 0 1px var(--gold-line); }
