/* Ecomake theme: static pages, account, auth, errors.
 * Tokens and shared components (.btn, .input, .alert, .ph, .chip, .badge ...): site theme css/ecomake.css (parent theme).
 * Sections: 1 prose, 2 page frame, 3 welcome, 4 error page, 5 auth forms (core wa-* markup), 6 account.
 */

/* ---------- 1. prose: text of information pages ---------- */
.prose { max-width: 68ch; font-size: var(--fs-md); line-height: 1.65; color: var(--ink); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; letter-spacing: -.005em; color: var(--ink); }
.prose h2 { font-size: clamp(28px, 4.6vw, 38px); margin-top: 2em; }
.prose h3 { font-size: clamp(22px, 3.4vw, 28px); margin-top: 1.7em; }
.prose h4 { font-family: var(--f-ui); font-size: var(--fs-small); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 1.7em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { hyphens: manual; }
.prose strong, .prose b { font-weight: 600; }
.prose a { color: var(--clay-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--cocoa); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--clay); }
.prose li > ul, .prose li > ol { margin-top: .45em; }
.prose blockquote { margin-inline: 0; padding: 14px 0 0; border-top: 1px solid var(--rose); font-family: var(--f-display); font-style: italic; font-size: 1.3em; line-height: 1.35; color: var(--cocoa); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose img { border-radius: var(--r-m); }
.prose figure figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: .5em; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: var(--fs-text); line-height: 1.45; -webkit-overflow-scrolling: touch; }
.prose th, .prose td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font-size: var(--fs-caption); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.prose dl { display: grid; gap: .3em 1.4em; grid-template-columns: 1fr; }
.prose dt { font-weight: 600; margin-top: .8em; }
.prose dd { color: var(--cocoa); }
@media (min-width: 640px) { .prose dl { grid-template-columns: minmax(10em, 1fr) 2fr; } .prose dt { margin-top: 0; } }
.prose .lead { font-size: clamp(18px, 2.6vw, 21px); max-width: none; }
.prose .small, .prose small { font-size: var(--fs-small); color: var(--muted); }
.prose .ph { font-size: var(--fs-small); line-height: 1.5; }
.prose .ph b { margin-bottom: 4px; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--paper); padding: 1px 6px; border-radius: 6px; }

/* ---------- 2. page frame (page.html) ---------- */
.page { padding-block: 8px 24px; }
.page .crumbs { padding-top: 12px; }
.page__head { margin: 4px 0 28px; max-width: 68ch; }
.page__title { font-size: clamp(34px, 7vw, 60px); overflow-wrap: break-word; }
.page__meta { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); max-width: 68ch; font-size: var(--fs-note); color: var(--muted); }
@media (min-width: 1024px) { .page { padding-bottom: 40px; } .page__head { margin-bottom: 36px; } }

/* ---------- 3. welcome page of the Site app ---------- */
.welcome { max-width: 52ch; margin-block: 56px; }
.welcome h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(32px, 6vw, 48px); line-height: 1.05; margin-bottom: 14px; }
.welcome p { color: var(--cocoa); }
.welcome a { color: var(--clay-deep); }

/* ---------- 4. error page (error.html) ---------- */
.err { padding-block: 40px 24px; display: grid; gap: 32px; justify-items: center; text-align: center; }
.err__code { font-family: var(--f-display); font-weight: 500; font-size: clamp(96px, 28vw, 200px); line-height: .85; letter-spacing: -.03em; color: var(--clay-deep); margin: 0; }
.err__body { display: grid; gap: 14px; justify-items: center; max-width: 52ch; }
.err__body .lead { max-width: 46ch; }
.err__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.err__actions .btn { flex: 1 1 200px; max-width: 260px; }
.err__links { display: flex; gap: 8px 22px; flex-wrap: wrap; justify-content: center; font-size: var(--fs-text); }
.err__links a { color: var(--cocoa); }
.err__links a:hover { color: var(--clay-deep); }
@media (min-width: 900px) {
  .err { padding-block: 72px 56px; }
}

/* ---------- 5. auth: login, signup, forgot / set password ----------
 * The forms are produced by the core (wa-system/login, wa-system/signup) with wa-* classes and their own
 * stylesheet, which the core appends to <head> after ours. The doubled class A = .s-auth-page.auth wins the cascade.
 */
.s-auth-page.auth { width: 100%; max-width: 480px; margin: 24px auto 40px; padding: 28px 22px 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-s); }
@media (min-width: 640px) { .s-auth-page.auth { margin-top: 48px; padding: 40px 40px 34px; } }
.s-auth-page.auth [class*="-form-wrapper"] { width: auto; max-width: none; margin: 0; padding: 0; font-size: var(--fs-body); line-height: 1.5; }
.s-auth-page.auth h1, .s-auth-page.auth .wa-login-form-title, .s-auth-page.auth .wa-signup-form-title { font-family: var(--f-display); font-weight: 500; font-size: clamp(32px, 7vw, 42px); line-height: 1.05; letter-spacing: -.01em; margin: 0 0 18px; color: var(--ink); }
.s-auth-page.auth .s-header { font-family: var(--f-display); font-weight: 500; font-size: clamp(32px, 7vw, 42px); line-height: 1.05; margin: 0 0 12px; }
.s-auth-page.auth .s-page-header p { color: var(--cocoa); margin-bottom: 8px; }
.s-auth-page.auth .wa-field { margin: 16px 0 0; }
.s-auth-page.auth .wa-field:first-child { margin-top: 0; }
.s-auth-page.auth .wa-field .wa-name { display: block; margin: 0 0 6px; font-size: var(--fs-small); line-height: 1.3; font-weight: 600; color: var(--ink); }
.s-auth-page.auth .wa-field .wa-value { margin: 0; }
.s-auth-page.auth input[type="text"],
.s-auth-page.auth input[type="email"],
.s-auth-page.auth input[type="password"],
.s-auth-page.auth input[type="tel"],
.s-auth-page.auth input[type="number"],
.s-auth-page.auth select,
.s-auth-page.auth textarea { display: block; width: 100%; max-width: 100%; min-height: 52px; margin: 0; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--white); color: var(--ink); font: inherit; font-size: var(--fs-body); line-height: 1.3; box-shadow: none; transition: border-color var(--t-fast); }
.s-auth-page.auth textarea { height: auto; min-height: 120px; }
.s-auth-page.auth input[type="text"]:hover,
.s-auth-page.auth input[type="email"]:hover,
.s-auth-page.auth input[type="password"]:hover,
.s-auth-page.auth select:hover { border-color: var(--muted); }
.s-auth-page.auth input[type="text"]:focus,
.s-auth-page.auth input[type="email"]:focus,
.s-auth-page.auth input[type="password"]:focus,
.s-auth-page.auth input[type="tel"]:focus,
.s-auth-page.auth select:focus,
.s-auth-page.auth textarea:focus { outline: none; border-color: var(--cocoa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--clay) 25%, transparent); }
.s-auth-page.auth input.wa-error,
.s-auth-page.auth select.wa-error,
.s-auth-page.auth textarea.wa-error { border-color: var(--err); background: var(--err-soft); }
.s-auth-page.auth input::placeholder { color: var(--muted); opacity: .8; }
.s-auth-page.auth .wa-error-msg { display: block; margin: 6px 0 0; color: var(--err); font-size: var(--fs-note); font-style: normal; line-height: 1.4; }
.s-auth-page.auth .wa-uncaught-errors { margin: 16px 0 0; }
.s-auth-page.auth .wa-uncaught-errors:empty { display: none; }
.s-auth-page.auth .wa-uncaught-errors .wa-error-msg, .s-auth-page.auth .wa-info-messages .wa-error-msg { margin: 0; padding: 12px 16px; border-radius: var(--r-s); background: var(--err-soft); }
.s-auth-page.auth .wa-info-messages { margin: 0 0 16px; }
.s-auth-page.auth .wa-info-messages:empty { display: none; }
.s-auth-page.auth .wa-info-msg, .s-auth-page.auth .wa-success-msg { display: block; padding: 12px 16px; border-radius: var(--r-s); background: var(--ok-soft); color: var(--ok); font-size: var(--fs-small); font-style: normal; }
.s-auth-page.auth a { color: var(--clay-deep); }
.s-auth-page.auth a:hover { color: var(--cocoa); }
.s-auth-page.auth .wa-login-forgotpassword-url { display: inline-block; margin: 8px 0 0; font-size: var(--fs-small); }
/* remember me and agreement: same checkbox as .check */
.s-auth-page.auth .wa-field-remember-me, .s-auth-page.auth .wa-field-terms-accepted { margin-top: 14px; }
.s-auth-page.auth .wa-field-remember-me label, .s-auth-page.auth .wa-field-terms-accepted label { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.45; cursor: pointer; }
.s-auth-page.auth input[type="checkbox"] { appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; margin: 0; border: 1.5px solid var(--cocoa); border-radius: 6px; background: var(--white); cursor: pointer; }
.s-auth-page.auth input[type="checkbox"]:checked { background: var(--cocoa); }
.s-auth-page.auth input[type="checkbox"]:checked::after { content: ''; width: 6px; height: 11px; border: solid var(--ivory); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
/* buttons: same look as .btn--primary */
.s-auth-page.auth input[type="submit"],
.s-auth-page.auth button:not(.wa-confirmation-code-input-submit-loading),
.s-auth-page.auth .wa-confirmation-code-input-submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--tap); margin: 0; padding: 0 26px; border: 1.5px solid transparent; border-radius: var(--r-pill); background: var(--cocoa); color: var(--ivory); font: inherit; font-size: var(--fs-body); font-weight: 600; line-height: 1; cursor: pointer; box-shadow: none; text-shadow: none; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.s-auth-page.auth input[type="submit"]:hover,
.s-auth-page.auth button:hover { background: var(--ink); }
.s-auth-page.auth input[type="submit"]:active, .s-auth-page.auth button:active { transform: scale(.98); }
.s-auth-page.auth input[type="submit"]:focus-visible, .s-auth-page.auth button:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
.s-auth-page.auth .wa-login-form-actions, .s-auth-page.auth .wa-signup-form-actions, .s-auth-page.auth .wa-forgotpassword-form-actions { margin-top: 22px; }
.s-auth-page.auth .wa-buttons-wrapper, .s-auth-page.auth .wa-forgotpassword-button { margin-top: 20px; }
.s-auth-page.auth .wa-field-login .wa-forgotpassword-button { margin-top: 14px; }
.s-auth-page.auth .wa-buttons-wrapper .loading, .s-auth-page.auth .wa-loading { margin-left: 8px; }
.s-auth-page.auth .wa-signup-url, .s-auth-page.auth .wa-login-url { margin-top: 18px; text-align: center; font-size: var(--fs-text); color: var(--cocoa); }
.s-auth-page.auth .wa-edit-login-link-wrapper, .s-auth-page.auth .wa-send-again-confirmation-code-link-wrapper { margin-top: 8px; font-size: var(--fs-small); }
.s-auth-page.auth .wa-confirmation-code-input-message, .s-auth-page.auth .wa-confirmation-code-sent-message { margin-top: 8px; font-size: var(--fs-small); color: var(--cocoa); }
.s-auth-page.auth .wa-value.wa-confirmation-code-input-submit-wrapper { margin-top: 14px; }
/* social sign-in */
.s-auth-page.auth .wa-adapters-section { margin: 0 0 18px; }
.s-auth-page.auth .wa-section-header { font-size: var(--fs-caption); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.s-auth-page.auth .wa-adapters-list { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.s-auth-page.auth .wa-adapters-list a { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 1.5px solid var(--line); border-radius: 50%; }
.s-auth-page.auth .wa-adapters-list img { width: 24px; height: 24px; }
.s-auth-page.auth .wa-section-divider { margin-top: 16px; text-align: center; color: var(--muted); font-size: var(--fs-note); }
/* captcha */
.s-auth-page.auth .wa-captcha-field img { border-radius: var(--r-s); max-width: 100%; height: auto; }

/* ---------- 6. account: my.nav, orders, order, profile ---------- */
.acct { padding-block: 24px 16px; }
@media (min-width: 1024px) { .acct { padding-block: 48px 24px; } }
.acct__title { margin: 0 0 18px; }
.acct__lead { margin: -6px 0 22px; color: var(--cocoa); max-width: 56ch; }
.acct-nav { margin: 0 0 28px; }
.acct-nav ul { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-nav li { margin: 0; }
.acct-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--ivory); font-weight: 500; font-size: var(--fs-text); text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast); }
.acct-nav a:hover { border-color: var(--cocoa); }
.acct-nav .is-selected a { background: var(--cocoa); color: var(--ivory); border-color: var(--cocoa); }
.acct .is-hidden { display: none !important; }

/* orders list */
.acct-orders { display: grid; gap: 14px; max-width: 760px; }
.acct-order { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.acct-order__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; text-decoration: none; background: var(--paper); transition: background var(--t-fast); }
.acct-order__head:hover { background: var(--rose-soft); }
.acct-order__num { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-2xl); line-height: 1.1; }
.acct-order__body { display: grid; gap: 10px; padding: 16px 18px 18px; font-size: var(--fs-text); }
.acct-order__row { display: grid; gap: 2px; }
.acct-order__label { font-size: var(--fs-caption); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.acct-order__goods li + li { margin-top: 4px; }
@media (min-width: 640px) {
  .acct-order__row { grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: baseline; }
}
.acct-empty { max-width: 52ch; display: grid; gap: 16px; justify-items: start; padding: 8px 0 24px; }

/* single order */
.acct-ord { max-width: 820px; display: grid; gap: 28px; }
.acct-ord__head { display: grid; gap: 8px; }
.acct-ord__title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.acct-ord__date { color: var(--muted); font-size: var(--fs-text); }
.acct-ord__cols { display: grid; gap: 14px; }
@media (min-width: 720px) { .acct-ord__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.acct-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 20px; display: grid; gap: 8px; align-content: start; font-size: var(--fs-text); }
.acct-box h2, .acct-box h3 { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-2xl); line-height: 1.1; margin: 0; }
.acct-box__name { font-weight: 600; }
.acct-box p { margin: 0; color: var(--cocoa); }
.acct-box .s-plugin-wrapper { margin-top: 6px; }
.acct-items { width: 100%; border-collapse: collapse; font-size: var(--fs-text); background: var(--white); }
.acct-items-wrap { border: 1px solid var(--line); border-radius: var(--r-m); overflow-x: auto; background: var(--white); -webkit-overflow-scrolling: touch; }
.acct-items th { text-align: left; padding: 12px 16px; font-size: var(--fs-caption); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); background: var(--paper); }
.acct-items td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.acct-items tr:last-child td { border-bottom: 0; }
.acct-items .num, .acct-items th.num { text-align: right; }
.acct-items .acct-items__sum td { background: var(--paper); }
.acct-items .acct-items__total td { font-size: var(--fs-md); font-weight: 700; background: var(--paper); }
.acct-items .is-service td:first-child { color: var(--cocoa); padding-left: 28px; }
.acct-items .muted { font-weight: 400; }
.acct-items a { color: var(--clay-deep); font-weight: 600; }
.acct-pin { max-width: 440px; display: grid; gap: 16px; }
.acct-pin p { color: var(--cocoa); }

/* profile (Site app template my.profile.html, rendered inside the Shop frame) */
.acct-profile { max-width: 760px; }
.acct-profile .alert { margin-bottom: 20px; }
.acct-profile .wa-form { display: grid; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 20px; box-shadow: var(--shadow-s); }
@media (min-width: 640px) { .acct-profile .wa-form { padding: 30px 32px; } }
.acct-profile .wa-field { margin: 0; display: grid; gap: 6px; }
.acct-profile .wa-name { font-size: var(--fs-note); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.acct-profile .wa-name label { font: inherit; }
.acct-profile .wa-value { font-size: var(--fs-body); overflow-wrap: anywhere; }
.acct-profile form.wa-form .wa-name { font-size: var(--fs-small); letter-spacing: 0; text-transform: none; color: var(--ink); }
@media (min-width: 640px) {
  .acct-profile .wa-form:not(form) .wa-field { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: baseline; }
}
.acct-profile .wa-value p { margin: 0 0 10px; }
.acct-profile .wa-value p:last-child { margin-bottom: 0; }
.acct-profile .wa-value > span { color: var(--muted); font-size: var(--fs-note); }
.acct-profile input[type="text"], .acct-profile input[type="email"], .acct-profile input[type="password"], .acct-profile input[type="tel"], .acct-profile input[type="date"], .acct-profile select, .acct-profile textarea { display: block; width: 100%; max-width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--white); color: var(--ink); font: inherit; font-size: var(--fs-body); }
.acct-profile textarea { min-height: 110px; }
.acct-profile input:focus, .acct-profile select:focus, .acct-profile textarea:focus { outline: none; border-color: var(--cocoa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--clay) 25%, transparent); }
.acct-profile .errormsg, .acct-profile .wa-error-msg { color: var(--err); font-size: var(--fs-note); }
.acct-profile input.error, .acct-profile .error input { border-color: var(--err); background: var(--err-soft); }
.acct-profile .wa-field-photo img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.acct-profile input[type="submit"], .acct-profile input[type="button"], .acct-profile .general-button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 26px; margin-right: 8px; border: 1.5px solid transparent; border-radius: var(--r-pill); background: var(--cocoa); color: var(--ivory); font: inherit; font-size: var(--fs-body); font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none; transition: background var(--t-fast); }
.acct-profile input[type="submit"]:hover, .acct-profile input[type="button"]:hover, .acct-profile .general-button:hover { background: var(--ink); }
.acct-profile input.transparent, .acct-profile .general-button { background: transparent; color: var(--cocoa); border-color: var(--cocoa); }
.acct-profile input.transparent:hover, .acct-profile .general-button:hover { background: var(--cocoa); color: var(--ivory); }
.acct-profile .button-block .wa-value { display: flex; gap: 10px; flex-wrap: wrap; }
.acct-profile .button-block input { margin-right: 0; }
.acct-profile .page-section { margin-top: 32px; }
.acct-profile .section-header { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-3xl); margin: 0 0 12px; }
.acct-profile .auth-type-wrapper { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.acct-profile .auth-item a, .acct-profile .auth-item span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--r-pill); text-decoration: none; background: var(--white); }
.acct-profile .auth-item img { width: 20px; height: 20px; }
.s-auth-page.auth a.btn { color: var(--ivory); text-decoration: none; }
.s-auth-page.auth a.btn:hover { color: var(--ivory); }
.s-auth-page.auth .wa-error-msg:empty { display: none; }
.s-auth-page.auth .wa-field .wa-forgotpassword-button { display: block; }
.s-auth-page.auth .wa-field .wa-edit-login-link-wrapper { display: block; }
