/* Doc 557 — /linkinbio ("Powered by Monezzi" landing). Mobile first: one
   column on a phone, wider cards from 760px. Logical properties (RTL); the
   monezzi.com/@name field stays left-to-right in every language. */

.lib { --lib-ink: #0F172A; --lib-muted: #475569; --lib-line: #E2E8F0; --lib-blue: #2563EB; --lib-navy: #0B1220;
       --lib-gold: #F59E0B; --lib-ok: #16A34A; --lib-bad: #DC2626;
       color: var(--lib-ink); background: #F8FAFC; overflow-x: hidden; }
.lib *, .lib *::before, .lib *::after { box-sizing: border-box; }
.lib-wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 18px; }

/* Top bar */

/* Hero */
.lib-hero { padding: 26px 0 30px; background: radial-gradient(120% 70% at 50% 0%, #E0ECFF 0%, #F8FAFC 70%); }
.lib-source { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 6px 14px 6px 6px; border-radius: 999px;
              background: #fff; border: 1px solid var(--lib-line); color: var(--lib-ink); text-decoration: none; font-size: 14px; font-weight: 600;
              box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.lib-source img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.lib-h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
/* The address breaks only after "monezzi.com/" on a narrow phone. */
.lib-url { color: var(--lib-blue); }
.lib-url > span { display: inline-block; white-space: nowrap; }
.lib-url em { font-style: normal; border-bottom: 3px solid var(--lib-gold); }
.lib-sub { margin: 10px 0 0; font-size: 17px; line-height: 1.45; color: var(--lib-muted); }
.lib-note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 14px; color: var(--lib-muted); }
.lib-note svg { color: var(--lib-ok); flex: 0 0 auto; }

/* Claim box (hero + close) */
.lib-claim { margin-top: 20px; }
.lib-label { display: block; font-size: 13px; font-weight: 700; color: var(--lib-muted); margin-bottom: 6px; }
.lib-field { display: flex; align-items: center; height: 56px; padding: 0 14px; border-radius: 14px; background: #fff;
             border: 2px solid var(--lib-line); transition: border-color .15s; }
.lib-field:focus-within { border-color: var(--lib-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.lib-prefix { font-size: 17px; font-weight: 600; color: var(--lib-muted); white-space: nowrap; }
.lib-field input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit;
                   font-size: 17px; font-weight: 700; color: var(--lib-ink); padding: 0 2px; }
.lib-field input::placeholder { color: #94A3B8; font-weight: 600; }
.lib-mark { flex: 0 0 22px; height: 22px; border-radius: 50%; }
.lib-mark.is-ok { background: var(--lib-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.lib-mark.is-bad { background: var(--lib-bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 12px no-repeat; }
.lib-status { min-height: 20px; margin: 8px 2px 0; font-size: 14px; font-weight: 600; color: var(--lib-muted); }
.lib-status.is-ok { color: var(--lib-ok); }
.lib-status.is-bad { color: var(--lib-bad); }
.lib-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.lib-sugg[hidden] { display: none; }
.lib-chip { appearance: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #BFDBFE; background: #EFF6FF;
            color: var(--lib-blue); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; direction: ltr; }
.lib-cta { display: flex; align-items: center; justify-content: center; min-height: 54px; margin-top: 12px; padding: 0 20px; border-radius: 14px;
           background: var(--lib-navy); color: #fff; font-size: 17px; font-weight: 800; text-decoration: none; text-align: center;
           box-shadow: 0 10px 24px rgba(11, 18, 32, .22); overflow-wrap: anywhere; }
.lib-cta:hover, .lib-cta:focus, .lib-cta:visited { color: #fff; }
/* The arrow follows the reading direction. */
.lib-cta::after { content: "\2192"; margin-inline-start: .45em; }
[dir="rtl"] .lib-cta::after { content: "\2190"; }
.lib-cta:focus-visible, .lib-chip:focus-visible, .lib-source:focus-visible { outline: 3px solid var(--lib-gold); outline-offset: 2px; }

/* Headings */
.lib-h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }

/* Steps */
.lib-steps { padding: 30px 0; background: #fff; border-top: 1px solid var(--lib-line); border-bottom: 1px solid var(--lib-line); }
.lib-steps-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; text-align: center; }
.lib-steps-list li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lib-steps-list b { font-size: 14px; line-height: 1.25; }
.lib-steps-list small { font-size: 12px; line-height: 1.3; color: var(--lib-muted); overflow-wrap: anywhere; }
.lib-step-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #EFF6FF; color: var(--lib-blue); }

/* Story */
.lib-story { padding: 34px 0 12px; }
.lib-beat { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center; margin-bottom: 18px; padding: 18px; border-radius: 18px;
            background: #fff; border: 1px solid var(--lib-line); }
.lib-beat h3, .lib-beat-wide h3, .lib-peak h3 { margin: 6px 0 4px; font-size: 20px; line-height: 1.25; font-weight: 800; }
.lib-beat p, .lib-beat-wide > p, .lib-peak p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--lib-muted); }
.lib-beat-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lib-gold); color: #111;
              font-size: 14px; font-weight: 800; }
.lib-beat-wide { margin-bottom: 18px; }
.lib-beat-wide > p { margin-bottom: 16px; }
.lib-peak { margin: 4px 0 26px; padding: 22px 20px; border-radius: 18px; color: #fff;
            background: linear-gradient(135deg, #0B1220 0%, #1E3A8A 100%); box-shadow: 0 14px 32px rgba(11, 18, 32, .25); }
.lib-peak h3 { font-size: 22px; color: #fff; }
.lib-peak p { color: rgba(255, 255, 255, .82); }

/* Story mock-ups (decorative) */
.lib-mock { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: 16px; background: #F1F5F9; }
.lib-mock-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #93C5FD, #2563EB); border: 3px solid #fff; }
.lib-mock-line { height: 8px; border-radius: 6px; background: #CBD5E1; }
.lib-w60 { width: 60%; } .lib-w40 { width: 40%; }
.lib-mock-socials { display: flex; gap: 6px; margin-top: 4px; }
.lib-mock-socials i { width: 24px; height: 24px; border-radius: 7px; }
.lib-s-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.lib-s-yt { background: #FF0000; } .lib-s-tt { background: #000; } .lib-s-wa { background: #25D366; }
.lib-mock-buttons { align-items: stretch; }
.lib-mock-btn { height: 30px; border-radius: 10px; background: #fff; border: 1px solid var(--lib-line); }
.lib-mock-btn.lib-hl { background: var(--lib-blue); border-color: var(--lib-blue); }

/* Toolkit: a swipeable row on a phone, a grid from 760px */
.lib-tools { padding: 30px 0; background: #fff; border-top: 1px solid var(--lib-line); }
.lib-tools-sub { margin: -8px 0 16px; color: var(--lib-muted); font-size: 15.5px; }
.lib-tools-row { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 12px; margin: 0 -18px; padding: 2px 18px 10px;
                 list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lib-tools-row::-webkit-scrollbar { display: none; }
.lib-tools-row li { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px;
                    background: #F8FAFC; border: 1px solid var(--lib-line); }
.lib-tools-row b { font-size: 16px; }
.lib-tools-row small { font-size: 14px; line-height: 1.4; color: var(--lib-muted); overflow-wrap: anywhere; }
.lib-tool-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #EFF6FF; color: var(--lib-blue); }
.lib-limits { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--lib-ink); }

/* Close */
.lib-close { padding: 34px 0 110px; background: radial-gradient(120% 80% at 50% 100%, #FEF3C7 0%, #F8FAFC 70%); }
.lib-close .lib-h2 { margin-bottom: 0; }
.lib-expert { margin: 18px 0 0; font-size: 14.5px; color: var(--lib-muted); }
.lib-expert a { font-weight: 700; color: var(--lib-blue); text-decoration: none; }

/* Sticky claim bar */
.lib-sticky { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px;
              padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--lib-line);
              -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 -8px 24px rgba(15, 23, 42, .08); }
.lib-sticky[hidden] { display: none; }
.lib-sticky-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--lib-muted); }
.lib-sticky-url b { color: var(--lib-ink); }
.lib-cta-sm { flex: 0 0 auto; min-height: 46px; margin: 0; padding: 0 18px; font-size: 15px; }

@media (min-width: 760px) {
    .lib-hero { padding: 48px 0 52px; }
    .lib-h1 { font-size: 42px; }
    .lib-beat { grid-template-columns: 1.2fr 1fr; padding: 24px; }
    .lib-beat-flip .lib-beat-copy { order: 2; }
    .lib-tools-row { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
    .lib-sticky { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lib-field { transition: none; }
}
