/* Product hub pages (views/site/hub.php), on top of css/site/ai.css */
.hub-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.hub-hero .ai-hero h1 { max-width: 16ch; }

/* hero media: a screenshot with a second real piece (code, a clipped panel) overlapping its corner */
.hub-stack { position: relative; padding-block-end: 64px; padding-inline-end: 40px; }
.hub-stack > .hub-code, .hub-stack > .hub-chip-shot { position: absolute; inset-inline-end: 0; bottom: 0; width: min(76%, 470px); box-shadow: var(--shadow-lg); }
.hub-stack > .hub-code pre { max-height: 236px; }

/* three phones, the middle one raised */
.hub-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: end; max-width: 620px; margin-inline: auto; }
.hub-phones .phone { width: auto; }
.hub-phones .phone:nth-child(2) { transform: translateY(-36px); }

/* highlight cards: smaller than the AI hub's */
.hub-cards { margin-top: 64px; }
.hub-cards > div { padding: 24px; }
.hub-cards b { font-size: 19px; }
.hub-cards span { font-size: 15px; }

/* a real text excerpt in a window */
.hub-code { margin: 0; border-radius: 14px; overflow: hidden; background: #0E1116; color: #E6EAF2; border: 1px solid #1F2633; }
.hub-code figcaption { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #161B24; border-bottom: 1px solid #1F2633; }
.hub-code figcaption i { width: 9px; height: 9px; border-radius: 50%; background: #3A4352; }
.hub-code figcaption span { margin-inline-start: 8px; font: 500 12px/1 var(--mono); color: #9AA3B0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hub-code pre { margin: 0; padding: 16px 18px; overflow: auto; font: 400 13px/1.6 var(--mono); white-space: pre; tab-size: 2; }
.hub-code code { font: inherit; }

/* a small clipped panel screenshot */
.hub-chip-shot { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.hub-chip-shot img { display: block; width: 100%; height: auto; }
.hub-chip-shot figcaption { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); background: var(--panel); }

/* feature rows: copy and a screenshot side by side, alternating */
.hub-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.hub-row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.hub-row.flip .hub-copy { order: 2; }
.hub-row.is-phone { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.hub-row.is-phone.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.hub-copy { display: grid; gap: 16px; justify-items: start; }
.hub-copy h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.035em; line-height: 1.1; text-wrap: balance; }
.hub-copy > p { color: var(--ink-muted); font-size: 18px; max-width: 52ch; }
.hub-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.hub-points li { position: relative; padding-inline-start: 30px; }
.hub-points li::before { content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B59F0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.hub-link { font-weight: 600; color: var(--accent); text-decoration: none; }
.hub-link:hover { text-decoration: underline; }
.hub-media { display: grid; gap: 16px; }
.hub-media .frame { box-shadow: var(--shadow-md); }
.hub-media .frame img { display: block; }
.hub-row.is-phone .hub-media { justify-items: center; }
.hub-row.is-phone .phone { width: 270px; }
.hub-note { color: var(--ink-faint); font-size: 13px; }
.hub-row.is-phone .hub-note { text-align: center; }

/* phone tiles: the top of a phone screenshot on a tinted panel, then the copy */
.hub-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.hub-tiles article { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.hub-tile-shot { height: 380px; overflow: hidden; display: grid; justify-items: center; padding-top: 36px; background: linear-gradient(160deg, var(--accent-soft), var(--panel)); border-bottom: 1px solid var(--line); }
.hub-tile-shot .phone { width: 240px; box-shadow: var(--shadow-md); }
.hub-tile-copy { padding: 24px 26px 28px; display: grid; gap: 8px; align-content: start; justify-items: start; }
.hub-tile-copy h3 { font: 700 21px/1.25 var(--display); letter-spacing: -.015em; }
.hub-tile-copy p { color: var(--ink-muted); font-size: 15px; }

/* a diagram (labelled as one) */
.hub-flow { display: grid; gap: 12px; counter-reset: f; }
.hub-flow > div { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px 18px 64px; display: grid; gap: 2px; box-shadow: var(--shadow-md); }
.hub-flow > div::before { counter-increment: f; content: counter(f); position: absolute; inset-inline-start: 20px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 14px/30px var(--body); text-align: center; }
.hub-flow > div:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 34px; bottom: -13px; width: 2px; height: 14px; background: var(--accent); opacity: .4; }
.hub-flow b { font-weight: 700; }
.hub-flow span { color: var(--ink-muted); font-size: 15px; }
[dir="rtl"] .hub-flow > div { padding: 18px 64px 18px 20px; }

/* phones of real-looking sites, scrolling sideways */
.hub-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 24px; overflow-x: auto; padding: 40px max(24px, calc((100vw - 1200px) / 2)) 28px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.hub-strip:focus-visible { outline: none; box-shadow: inset var(--ring); }
.hub-strip figure { margin: 0; display: grid; gap: 14px; scroll-snap-align: center; }
.hub-strip .phone { width: auto; }
.hub-strip figcaption { display: grid; gap: 2px; text-align: center; }
.hub-strip figcaption span { color: var(--ink-muted); font-size: 14px; }
.hub-showcase .hub-note { text-align: center; }

@media (max-width: 980px) {
    .hub-hero { grid-template-columns: 1fr; }
    .hub-hero .ai-hero-media { max-width: 640px; order: 0; }
    .hub-row, .hub-row.flip, .hub-row.is-phone, .hub-row.is-phone.flip { grid-template-columns: 1fr; gap: 32px; }
    .hub-row.flip .hub-copy { order: 0; }
    .hub-tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .hub-stack { padding: 0; display: grid; gap: 14px; }
    .hub-stack > .hub-code, .hub-stack > .hub-chip-shot { position: static; width: auto; }
    .hub-phones { gap: 10px; }
    .hub-phones .phone { padding: 5px; border-radius: 22px; }
    .hub-phones .phone img { border-radius: 18px; }
    .hub-phones .phone:nth-child(2) { transform: translateY(-20px); }
    .hub-row.is-phone .phone { width: 230px; }
    .hub-tiles { grid-template-columns: 1fr; }
    .hub-tile-shot { height: 340px; }
    .hub-strip { grid-auto-columns: 180px; gap: 16px; }
    .hub-code pre { font-size: 12px; }
}

/* 2026-10 second round of hubs (Make money, Listings and search, Trust and safety, Multilingual, Messaging) */

/* cards that link to their section */
.hub-cards > a .ai-hub-ic { transition: background .2s, color .2s; }
.hub-cards > a:hover .ai-hub-ic { background: var(--accent); color: #fff; }
.hub-cards > a b::after { content: " →"; color: var(--accent); opacity: 0; transition: opacity .2s; }
.hub-cards > a:hover b::after { opacity: 1; }

/* numbers band */
.hub-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.hub-stats > div { padding: 26px 28px; display: grid; gap: 4px; align-content: start; }
.hub-stats > div + div { border-inline-start: 1px solid var(--line); }
.hub-stats b { font: 800 clamp(30px, 3.4vw, 44px)/1 var(--display); letter-spacing: -.04em; color: var(--ink); }
.hub-stats span { color: var(--ink-muted); font-size: 15px; line-height: 1.4; }

/* a plan or switch note under a row's eyebrow */
.hub-plan { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); margin-top: -6px; }

.hub-stack > .hub-chip-shot.is-small { width: min(40%, 280px); }
.hub-media > .hub-chip-shot.is-small { max-width: 440px; justify-self: center; }

/* a phone overlapping a hero screenshot */
.hub-stack > .phone { position: absolute; inset-inline-end: 0; bottom: 0; width: min(30%, 190px); box-shadow: var(--shadow-lg); }
.hub-stack.has-phone { padding-inline-end: 72px; padding-block-end: 40px; }

/* the tour: numbered tabs on the left, the screenshot of the open one on the right */
.hub-tour { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; margin-top: 44px; align-items: start; }
.hub-tour-tabs { display: grid; gap: 6px; position: sticky; top: 96px; }
.hub-tour-tabs [role=tab] { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; text-align: start; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid transparent; background: none; font: inherit; color: inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.hub-tour-tabs [role=tab]:hover { background: var(--panel); }
.hub-tour-tabs [role=tab][aria-selected=true] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-md); }
.hub-tour-tabs [role=tab]:focus-visible { outline: none; box-shadow: var(--ring); }
.hub-tour-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--ink-muted); font: 700 14px/1 var(--body); transition: background .2s, color .2s; }
[aria-selected=true] .hub-tour-n { background: var(--accent); color: #fff; }
.hub-tour-l { display: grid; gap: 4px; padding-top: 6px; }
.hub-tour-l b { font-weight: 650; font-size: 17px; }
.hub-tour-l span { color: var(--ink-muted); font-size: 15px; line-height: 1.45; display: none; }
[aria-selected=true] .hub-tour-l span { display: block; }
.hub-tour-panel { animation: hub-fade .35s ease; }
.hub-tour-panel .frame { box-shadow: var(--shadow-lg); }
.hub-tour-panel .frame img, .hub-tour-panel .hub-chip-shot img { display: block; width: 100%; height: auto; }
.hub-tour-panel .phone { width: 300px; margin-inline: auto; }
.hub-tour-sec .hub-note { margin-top: 18px; }
@keyframes hub-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hub-tour-panel { animation: none; } }

/* language switcher in the hero: a frame per language */
.hub-langs { display: grid; gap: 14px; }
.hub-langs-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hub-langs-bar [role=tab] { padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font: 600 14px/1 var(--body); color: var(--ink-muted); cursor: pointer; transition: all .2s; }
.hub-langs-bar [role=tab]:hover { color: var(--ink); border-color: var(--line-strong); }
.hub-langs-bar [role=tab][aria-selected=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.hub-langs-bar [role=tab]:focus-visible { outline: none; box-shadow: var(--ring); }
.hub-langs [role=tabpanel] { animation: hub-fade .3s ease; }
.hub-langs .frame { box-shadow: var(--shadow-lg); }
.hub-langs-note { text-align: center; }

/* payment providers by region */
.hub-gw { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.hub-gw > div:first-child { grid-column: 1 / -1; }
.hub-gw > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 10px; }
.hub-gw b { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.hub-gw ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hub-gw li { padding: 7px 12px; border-radius: 10px; background: var(--panel); font-weight: 600; font-size: 15px; }
.hub-gw li small { font-weight: 400; color: var(--ink-muted); font-size: 13px; }

/* two pieces side by side in a row's media: a tall clipped panel and a phone */
.hub-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.hub-duo .phone { width: auto; max-width: 280px; justify-self: center; box-shadow: var(--shadow-lg); }
.hub-duo .hub-chip-shot { box-shadow: var(--shadow-md); }
.hub-duo .hub-chip-shot img { max-height: 620px; object-fit: cover; object-position: top; }

/* a real excerpt next to a screenshot */
.hub-media .hub-code pre { max-height: 300px; }

/* earnings calculator */
.hub-calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); border: 1px solid var(--line); border-radius: 32px; padding: 48px; }
.hub-calc-copy { display: grid; gap: 14px; }
.hub-calc-copy h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.035em; }
.hub-calc-copy > p { color: var(--ink-muted); font-size: 18px; max-width: 52ch; }
.hub-calc-form { display: grid; gap: 18px; margin-top: 10px; }
.hub-calc-form label { display: grid; gap: 8px; }
.hub-calc-l { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 15px; }
.hub-calc-l output { font: 700 15px/1 var(--mono); color: var(--accent); }
.hub-calc-form input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--line) var(--fill, 50%)); outline: none; }
[dir=rtl] .hub-calc-form input[type=range] { background: linear-gradient(to left, var(--accent) var(--fill, 50%), var(--line) var(--fill, 50%)); }
.hub-calc-form input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: var(--shadow-sm); cursor: pointer; }
.hub-calc-form input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: pointer; }
.hub-calc-form input[type=range]:focus-visible { box-shadow: var(--ring); }
.hub-calc-result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow-lg); display: grid; gap: 6px; }
.hub-calc-result > span { color: var(--ink-muted); font-weight: 600; }
.hub-calc-result > b { font: 800 clamp(44px, 5vw, 64px)/1.05 var(--display); letter-spacing: -.045em; color: var(--ink); }
.hub-calc-result dl { margin: 14px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.hub-calc-result dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hub-calc-result dt { color: var(--ink-muted); }
.hub-calc-result dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.hub-calc-result .hub-note { margin-top: 10px; }

/* screenshots open larger */
.hub-zoomable { cursor: zoom-in; }
.hub-zoomable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hub-zoom { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); max-height: 92vh; overflow: visible; }
.hub-zoom::backdrop { background: rgba(10, 13, 20, .78); backdrop-filter: blur(3px); }
.hub-zoom img { display: block; max-width: 100%; max-height: 90vh; width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); background: #fff; }
.hub-zoom.is-phone img { max-height: 88vh; border-radius: 28px; }
.hub-zoom-x { position: absolute; top: -18px; inset-inline-end: -18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-md); }

@media (max-width: 980px) {
    .hub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hub-stats > div:nth-child(3) { border-inline-start: 0; }
    .hub-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .hub-tour { grid-template-columns: 1fr; gap: 20px; }
    .hub-tour-tabs { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
    .hub-tour-tabs [role=tab] { grid-template-columns: 28px auto; padding: 10px 14px; }
    .hub-tour-n { width: 28px; height: 28px; font-size: 13px; }
    .hub-tour-l { padding-top: 3px; }
    .hub-tour-l span, [aria-selected=true] .hub-tour-l span { display: none; }
    .hub-calc { grid-template-columns: 1fr; padding: 32px; gap: 28px; }
}
@media (max-width: 600px) {
    .hub-gw { grid-template-columns: 1fr; }
    .hub-duo { grid-template-columns: 1fr; }
    .hub-duo .hub-chip-shot img { max-height: 420px; }
    .hub-stats > div { padding: 20px; }
    .hub-stack > .phone { display: none; }
    .hub-stack.has-phone { padding: 0; }
    .hub-calc { padding: 24px 18px; border-radius: 24px; }
    .hub-calc-result { padding: 22px; }
    .hub-tour-panel .phone { width: 240px; }
}
