/*
 * The pricing page: the month/year toggle with its sliding knob, the four
 * plans, the comparison table, the strip for web designers and the closing
 * call. The hero is templates.css's .hm.ph.solo.
 */
@layer marketing {
    .mk {
        /* month / year */
        & .toggle {
            position: relative;
            display: inline-flex;
            padding: 3px;
            border-radius: 10px;
            background: var(--bg-2);
            border: 1px solid var(--line);
            margin-top: 32px;
        }
        & .toggle button {
            position: relative;
            z-index: 1;
            border: 0;
            background: none;
            height: 38px;
            padding: 0 16px;
            border-radius: 7px;
            cursor: pointer;
            font: inherit;
            font-size: 14px;
            color: var(--muted);
            display: flex;
            gap: 8px;
            align-items: center;
            transition: color 0.3s;
        }
        & .toggle button.on {
            color: var(--text);
        }
        & .toggle .knob {
            position: absolute;
            top: 3px;
            bottom: 3px;
            left: 3px;
            border-radius: 7px;
            background: #fff;
            box-shadow: rgb(14 17 23 / 0.12) 0 1px 3px;
            transition:
                transform 0.5s var(--out),
                width 0.5s var(--out);
        }
        & .toggle .save {
            font: 500 11px / 1 var(--f-mono);
            color: #0a0a0a;
        }

        /* the plans */
        & .plans {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0;
            border: 1px solid var(--line);
            border-radius: 18px;
            overflow: hidden;
            background: #fff;
        }
        & .plan {
            padding: 28px 24px 32px;
            display: grid;
            gap: 20px;
            align-content: start;
            border-left: 1px solid var(--line);
            position: relative;
        }
        & .plan:first-child {
            border-left: 0;
        }
        & .plan.hot {
            background: #f5f5f5;
        }
        & .plan h3 {
            font-size: 18px;
            letter-spacing: -0.015em;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }
        & .plan h3 small {
            font: 500 11px / 1 var(--f-mono);
            color: #0a0a0a;
        }
        & .plan .for {
            font-size: 14px;
            color: var(--muted);
            min-height: 2.9em;
            margin-top: -10px;
        }
        & .price {
            display: flex;
            align-items: baseline;
            gap: 6px;
            font-size: 44px;
            font-weight: 600;
            letter-spacing: -0.05em;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }
        & .price .per {
            font-size: 14px;
            font-weight: 400;
            color: var(--faint);
            letter-spacing: 0;
        }
        & .price .val {
            display: inline-block;
            transition:
                opacity 0.25s,
                transform 0.4s var(--out);
        }
        & .price .val.out {
            opacity: 0;
            transform: translateY(-8px);
        }
        & .sub {
            font-size: 13px;
            color: var(--faint);
            min-height: 1.3em;
            margin-top: -10px;
            font-variant-numeric: tabular-nums;
        }
        & .plan .btn {
            justify-content: center;
        }
        & .plan ul {
            list-style: none;
            margin: 0;
            padding: 0;
            display: grid;
            gap: 10px;
            font-size: 14px;
            color: var(--muted);
        }
        & .plan ul li {
            display: flex;
            gap: 10px;
        }
        & .plan ul li::before {
            content: "";
            flex: 0 0 auto;
            width: 14px;
            height: 14px;
            margin-top: 4px;
            background:
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.3l2.8 2.7L12.5 5' stroke='%230e1117' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
                center / 100% auto no-repeat;
        }
        & .foot-note {
            text-align: center;
            font-size: 13px;
            color: var(--faint);
            margin-top: 20px;
        }

        /* the comparison */
        & .tbl-wrap {
            overflow-x: auto;
        }
        & .cmp {
            width: 100%;
            min-width: 700px;
            border-collapse: collapse;
            font-size: 15px;
        }
        & .cmp th,
        & .cmp td {
            padding: 15px 12px;
            border-top: 1px solid var(--line);
            text-align: center;
            font-variant-numeric: tabular-nums;
        }
        & .cmp th:first-child,
        & .cmp td:first-child {
            text-align: left;
            padding-left: 0;
            width: 36%;
        }
        & .cmp thead th {
            border-top: 0;
            font-weight: 500;
        }
        & .cmp thead th small {
            display: block;
            color: var(--faint);
            font-weight: 400;
            font-size: 13px;
        }
        & .cmp .grp td {
            padding-top: 40px;
            border-top: 0;
            font: 500 12px / 1 var(--f-mono);
            color: var(--faint);
        }
        & .cmp td {
            color: var(--muted);
        }
        & .cmp td:first-child {
            color: var(--text);
        }
        & .yes {
            display: inline-block;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background:
                var(--text)
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.1L11.5 5.6' stroke='white' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
                center / 100% no-repeat;
            vertical-align: middle;
        }
        & .no {
            color: #c8cbd3;
        }

        /* for web designers */
        & .strip {
            display: flex;
            flex-wrap: wrap;
            gap: 24px;
            justify-content: space-between;
            align-items: center;
            padding: 36px 40px;
            border-radius: 18px;
            background: var(--bg);
            border: 1px solid var(--line);
        }
        & .strip h3 {
            font-size: clamp(22px, 2.4vw, 28px);
            letter-spacing: -0.03em;
            max-width: 24ch;
        }
        & .strip p {
            color: var(--muted);
            margin-top: 8px;
            font-size: 16px;
            max-width: 52ch;
        }

        /* the closing call */
        & .final {
            text-align: center;
        }
        & .final .h2 {
            font-size: clamp(40px, 6vw, 76px);
            letter-spacing: -0.045em;
            max-width: 14ch;
            margin: 0 auto;
        }
        & .final .ctas {
            margin-top: 36px;
        }
        & .final .note {
            margin-top: 18px;
        }
    }

    @media (max-width: 1000px) {
        .mk .plans {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .mk .plan:nth-child(3) {
            border-left: 0;
        }
        .mk .plan:nth-child(n + 3) {
            border-top: 1px solid var(--line);
        }
    }

    @media (max-width: 600px) {
        .mk .plans {
            grid-template-columns: minmax(0, 1fr);
        }
        .mk .plan {
            border-left: 0;
            border-top: 1px solid var(--line);
        }
        .mk .plan:first-child {
            border-top: 0;
        }
    }
}
