.profile {
    --paper: #fff8ec;
    --edge: #342638;
    --mint: #abe6d1;
    padding-block: 18px 68px;
}
.profile-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: clamp(174px, 23vw, 278px);
    overflow: hidden;
    margin-top: 16px;
    border: 3px solid var(--ink);
    border-radius: 8px;
    background: linear-gradient(135deg, #211d36 13%, #67365b 78%, #b65970);
    box-shadow: 5px 5px 0 var(--ink);
}
.profile-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: radial-gradient(#ffd1bd 1px, transparent 1.25px) 0 0 / 7px 7px;
    opacity: .19;
}
.profile-hero-art {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 45%;
    height: 100%;
    object-fit: cover;
    object-position: 53% 40%;
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
    filter: saturate(1.15) contrast(1.06);
}
.profile-hero-copy { width: 62%; padding: clamp(18px, 4vw, 54px); }
.profile-kicker { display: block; margin-bottom: 12px; color: var(--mint); font-weight: 750; }
.profile-hero h1 {
    margin: 0;
    color: #fff4d9;
    font-size: clamp(29px, 6.3vw, 80px);
    font-weight: 950;
    line-height: .97;
    letter-spacing: -.045em;
    text-transform: uppercase;
    text-shadow: 2px 3px var(--ink), 4px 5px var(--ink);
    overflow-wrap: normal;
}
.profile-hero-signed-in h1 { font-size: clamp(25px, 4.8vw, 58px); }
.profile-respect {
    margin: 13px 0 0;
    color: #abe6d1;
    font-size: clamp(16px, 2.8vw, 32px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: .025em;
    text-shadow: 2px 2px var(--ink);
}
.profile-inline-link { color: #513555; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.profile-grid, .profile-login {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}
.profile-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.profile-login { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-card {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 17px;
    min-width: 0;
    padding: clamp(17px, 2.6vw, 28px);
    border: 2px solid var(--ink);
    border-radius: 7px;
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--ink);
}
.profile-card h2 { margin: 0; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.05; letter-spacing: -.035em; }
.profile-subscription, .profile-referrals { grid-column: span 3; }
.profile-plans, .profile-account { grid-column: span 2; }
.profile-subscription:has(+ .profile-referrals) { grid-column: 1 / -1; }
.profile-subscription { border-top: 5px solid #3a8b78; }
.profile-plans { border-top: 5px solid #b96866; }
.profile-account, .profile-referrals { border-top: 5px solid #795175; }
.profile-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid #a87555;
    border-radius: 4px;
    background: #f9e5d4;
    color: #593823;
    font-weight: 750;
}
.profile-state.is-active { background: #def4e8; color: #245544; border-color: #699b85; }
.profile-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.profile-stats, .profile-identity { width: 100%; margin: 0; display: grid; gap: 8px; }
.profile-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); }
.profile-stats > div, .profile-identity > div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #c6d7cc;
    border-radius: 5px;
    background: #eaf2e9;
}
.profile-referrals .profile-stats > div, .profile-identity > div { border-color: #ded0df; background: #f2e8f1; }
.profile-stats dt, .profile-identity dt, .profile-card small { color: #564a5a; font-size: 13px; line-height: 1.35; }
.profile-stats dd, .profile-identity dd { margin: 4px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.profile-stats dd { font-size: clamp(16px, 2vw, 21px); line-height: 1.2; }
.profile-card small { display: block; margin-top: 4px; font-weight: 400; }
.profile-plan-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.profile-plan {
    --note: #dcebd5;
    position: relative;
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 12px 23px 12px 12px;
    border: 1px solid var(--edge);
    border-radius: 4px;
    background: repeating-linear-gradient(135deg, transparent 0 6px, #37263f08 6px 7px), var(--note);
    color: var(--ink);
    box-shadow: 2px 2px var(--edge);
    font-size: 13px;
    font-weight: 750;
}
.profile-plan-3 { --note: #f5e0bf; }
.profile-plan-6 { --note: #d7e7ee; }
.profile-plan-12 { --note: #eddbea; }
.profile-plan:hover { outline: 2px solid var(--edge); outline-offset: 1px; }
.profile-plan strong { font-size: clamp(17px, 2.1vw, 23px); white-space: nowrap; }
.plan-arrow { position: absolute; top: 8px; right: 8px; font-size: 15px; }
.profile-gift {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #825b7a;
    border-radius: 5px;
    background: #f2e4ef;
    color: var(--ink);
}
.profile-gift:hover { background: #ead6e7; }
.profile-gift:focus-visible { outline: 2px solid var(--edge); outline-offset: 2px; }
.profile-gift-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 5px;
    background: #fff8ec;
    font-size: 18px;
}
.profile-gift strong { display: block; line-height: 1.2; }
.profile-gift small { margin-top: 2px; }
.profile-gift-arrow { font-size: 20px; line-height: 1; }
.profile-link, .profile-email-form { width: 100%; min-width: 0; }
.profile-link label, .profile-email-form label { font-size: 14px; font-weight: 750; }
.profile input {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #a89aab;
    border-radius: 4px;
    background: #fffdf8;
    color: var(--ink);
}
.profile .button { padding: 9px 13px; font-size: 14px; }
.profile-email-form input { display: block; margin: 7px 0 10px; }
.profile .profile-muted, .profile-link p { color: var(--muted); }
.profile-link p:not(:empty) { margin-top: 7px; }
.profile-notice { margin-top: 20px; padding: 11px; border-left: 4px solid #95604d; background: #f6e5d7; }
@media (max-width: 740px) {
    .profile-grid, .profile-login { grid-template-columns: minmax(0, 1fr); }
    .profile-grid > .profile-card { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
    .profile-hero-copy { width: 73%; }
    .profile-hero h1 { font-size: clamp(23px, 7.5vw, 31px); }
    .profile-hero-signed-in h1 { font-size: clamp(20px, 6.4vw, 26px); }
    .profile-hero-art { width: 42%; object-position: 55% 40%; }
    .profile-link-actions > * { width: 100%; }
}

.profile-order-preview { margin-top: 20px; background: #e4eedf; }

.profile-link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-link details { margin-top: 9px; }
.profile-link summary { cursor: pointer; font-size: 14px; font-weight: 650; }
.profile-link summary:focus-visible { outline: 3px solid #629e48; outline-offset: 3px; }
.profile-link details input { margin-top: 8px; }
.profile-plans { scroll-margin-top: 16px; }
