/* Maré: account group (login, signup, forgot password, account, orders). Prefix: .ac- */

/* ---------------- Auth split layout ---------------- */
.ac-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 111px); min-height: calc(100svh - 111px); border-bottom: 1px solid var(--line); }
.ac-auth-pic { position: relative; overflow: hidden; background: var(--panel); }
.ac-auth-pic .media { position: absolute; inset: 0; animation: ac-clip 1.3s cubic-bezier(.41, .35, .2, 1) both; }
.ac-auth-pic .media img { object-position: 50% 35%; animation: ac-zoom 2.2s var(--ease) both; }
.ac-auth-pic .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0) 34%); pointer-events: none; }
.ac-auth-pic .media.ph::after { background: none; content: attr(data-ph); }
.ac-auth-cap { position: absolute; left: var(--pad); bottom: clamp(24px, 3vw, 44px); z-index: 2; color: #fff; font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.1; }
.ac-auth-panel { display: flex; align-items: center; justify-content: center; padding: clamp(56px, 7vw, 110px) var(--pad); }
.ac-auth-in { width: 100%; max-width: 440px; animation: ac-rise .9s var(--ease) .15s both; }
.ac-auth-in h1 { font-size: clamp(44px, 4.4vw, 64px); margin-top: 16px; }
.ac-lead { color: var(--muted); margin-top: 16px; max-width: 400px; }
.ac-form { margin-top: 40px; gap: 26px; max-width: none; }
.ac-form .err { margin-top: -14px; }
.ac-form .err[role="alert"] { margin-top: -8px; }
.ac-submit { width: 100%; margin-top: 6px; }
.cform .ac-submit { justify-self: stretch; }
.ac-alt { margin-top: 30px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ac-alt .ulink { color: var(--ink); font-size: 12px; }
.ac-note { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ac-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* Password field with show/hide */
.ac-pw { position: relative; display: block; }
.ac-pw input { padding-right: 64px; }
.ac-pw-t { position: absolute; right: 0; bottom: 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 4px 0 4px 8px; transition: color .25s; }
.ac-pw-t:hover { color: var(--ink); }

/* Row: remember + forgot */
.ac-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ac-small-link { font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .25s; }
.ac-small-link:hover { border-color: var(--ink); }

/* Custom checkbox */
.cform .ac-check, .ac-check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; line-height: 1.5; }
.cform .ac-check input, .ac-check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; padding: 0; }
.ac-check span { flex: none; width: 16px; height: 16px; margin-top: 3px; border: 1px solid #bcbcbc; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.ac-check span::after { content: ""; width: 8px; height: 4px; border-left: 1.4px solid #fff; border-bottom: 1.4px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; transition: opacity .2s; }
.ac-check input:checked + span { background: var(--ink); border-color: var(--ink); }
.ac-check input:checked + span::after { opacity: 1; }
.ac-check input:focus-visible + span { outline: 1.5px solid var(--ink); outline-offset: 3px; }
.ac-check input[aria-invalid="true"] + span { border-color: #a2412e; }
.ac-check a { border-bottom: 1px solid currentColor; }

/* Password strength */
.ac-strength { display: flex; align-items: center; gap: 14px; margin-top: -12px; font-size: 13px; color: var(--muted); }
.ac-bars { display: flex; gap: 4px; flex: none; }
.ac-bars i { width: 26px; height: 2px; background: var(--line); transition: background .3s; }
.ac-strength[data-s="1"] .ac-bars i:nth-child(-n+1),
.ac-strength[data-s="2"] .ac-bars i:nth-child(-n+2),
.ac-strength[data-s="3"] .ac-bars i:nth-child(-n+3),
.ac-strength[data-s="4"] .ac-bars i { background: var(--ink); }
.ac-strength[data-s="1"] .ac-bars i:nth-child(1) { background: #a2412e; }

/* Forgot password: sent state */
.ac-sent h1 { font-size: clamp(38px, 3.6vw, 52px); }
.ac-sent strong { color: var(--ink); font-weight: 400; }
.ac-resend { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 30px; font-size: 13px; color: var(--muted); }
.ac-resend .ulink[disabled] { opacity: .4; cursor: default; }
.ac-sent:focus { outline: none; }

/* ---------------- Dashboard (account + orders) ---------------- */
.ac-dash { padding: clamp(44px, 4.5vw, 72px) var(--pad) clamp(90px, 9vw, 140px); }
.ac-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: clamp(32px, 3.5vw, 48px); border-bottom: 1px solid var(--line); }
.ac-top h1 { font-size: clamp(46px, 5vw, 76px); margin-top: 14px; }
.ac-top-meta { text-align: right; font-size: 14px; color: var(--muted); }
.ac-top-meta strong { display: block; color: var(--ink); font-weight: 400; }
.ac-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-top: clamp(36px, 4vw, 56px); }

/* Side nav */
.ac-nav { position: sticky; top: 100px; align-self: start; display: grid; }
.ac-nav a, .ac-nav button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-align: left; transition: color .25s; }
.ac-nav a:first-child { border-top: 1px solid var(--line); }
.ac-nav a:hover, .ac-nav button:hover, .ac-nav a[aria-current="page"] { color: var(--ink); }
.ac-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.ac-nav .ac-n { font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.ac-nav button { margin-top: 18px; border-bottom: 0; }

/* Panels */
.ac-panel { animation: ac-rise .7s var(--ease) both; }
.ac-panel > h2 { font-size: clamp(34px, 3vw, 46px); }
.ac-panel > .ac-sub { color: var(--muted); margin-top: 10px; max-width: 520px; }
.ac-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.ac-card { background: var(--panel); padding: clamp(24px, 2.4vw, 34px); display: flex; flex-direction: column; gap: 14px; min-height: 230px; }
.ac-card h3 { font-size: clamp(28px, 2.3vw, 34px); }
.ac-card p:not(.eyebrow):not(.ac-big) { color: var(--muted); font-size: 15px; }
.ac-card .ulink { margin-top: auto; align-self: flex-start; font-size: 12px; }
.ac-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ac-card .ac-big { font-family: var(--serif); font-size: clamp(54px, 5vw, 72px); line-height: .9; color: var(--ink); }
.ac-lo { display: flex; gap: 16px; align-items: center; }
.ac-lo .media { width: 72px; height: 86px; flex: none; background: #fff; }
.ac-lo-txt { font-size: 15px; }
.ac-lo-txt span { display: block; color: var(--muted); font-size: 14px; }
.ac-thumbs { display: flex; gap: 8px; }
.ac-thumbs a { width: 64px; height: 76px; }
.ac-thumbs .media { width: 100%; height: 100%; background: #fff; }
.ac-thumbs .media img { transition: transform .6s var(--ease); }
.ac-thumbs a:hover .media img { transform: scale(1.05); }
.ac-code { font-family: var(--sans); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; border: 1px dashed #bcbcbc; padding: 8px 14px; align-self: flex-start; color: var(--ink); }

/* Status pill */
.ac-status { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; color: var(--ink); }
.ac-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b8b8b8; }
.ac-status[data-s="Shipped"]::before { background: var(--ink); }
.ac-status[data-s="Delivered"]::before { background: #6f6f6f; }

/* Addresses */
.ac-addr { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ac-addr-card { border: 1px solid var(--line); padding: clamp(24px, 2.4vw, 34px); }
.ac-addr-card .ac-card-head { margin-bottom: 18px; }
.ac-addr-txt { font-family: var(--serif); font-size: 22px; line-height: 1.35; }
.ac-addr-txt span { display: block; }
.ac-addr-actions { display: flex; gap: 24px; margin-top: 24px; }
.ac-addr-actions .ulink { font-size: 12px; }
.ac-addr-card .cform { max-width: none; gap: 20px; }
.ac-addr-card.ac-editing { grid-column: 1 / -1; }
.ac-addr-new { border: 1px dashed #d0d0d0; display: grid; place-items: center; min-height: 220px; color: var(--muted); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; transition: border-color .25s, color .25s; }
.ac-addr-new:hover { border-color: var(--ink); color: var(--ink); }
.ac-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--panel); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ac-btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ac-btns .btn { height: 48px; }

/* Details form */
.ac-details { margin-top: 32px; max-width: 640px; }
.ac-details .cform { max-width: none; }
.ac-select { display: block; width: 100%; margin-top: 12px; padding: 0 24px 12px 0; border: 0; border-bottom: 1px solid #d8d8d8; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231c1c1b' stroke-width='1.6'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 2px top 6px; font-size: 17px; outline: none; appearance: none; -webkit-appearance: none; border-radius: 0; text-transform: none; letter-spacing: 0; color: var(--ink); }
.ac-select:focus { border-bottom-color: var(--ink); }
.ac-hint { font-size: 13px; color: var(--muted); margin-top: -10px; }
.ac-hint a { color: var(--ink); border-bottom: 1px solid currentColor; }
.ac-sec2 { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; }
.ac-sec2 h3 { font-size: 28px; }
.ac-sec2 p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* Signed-out prompt */
.ac-out { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.ac-out .media { aspect-ratio: 4 / 5; max-height: 640px; }
.ac-out h1 { font-size: clamp(46px, 5vw, 76px); margin-top: 14px; }
.ac-out .ac-lead { max-width: 440px; }
.ac-out .ac-btns { margin-top: 36px; }
.ac-out ul { margin-top: 40px; border-top: 1px solid var(--line); max-width: 460px; }
.ac-out li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; justify-content: space-between; gap: 16px; }
.ac-out li span { color: var(--muted); }
.ac-flash { font-size: 14px; color: var(--ink); background: var(--panel); padding: 12px 16px; margin-bottom: 28px; max-width: 460px; }

/* ---------------- Orders list ---------------- */
.ac-orders { margin-top: 32px; border-top: 1px solid var(--line); }
.ac-order { border-bottom: 1px solid var(--line); }
.ac-oh { width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 132px minmax(0, .7fr) 28px; gap: 20px; align-items: center; padding: 26px 0; text-align: left; }
.ac-oh-no { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.ac-oh-no small { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 4px; }
.ac-oh-items { display: flex; gap: 6px; align-items: center; }
.ac-oh-items .media { width: 44px; height: 52px; background: var(--panel); }
.ac-oh-items em { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 6px; }
.ac-oh-total { text-align: right; font-size: 16px; }
.ac-oh-ico { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .4s var(--ease), background .25s, border-color .25s; }
.ac-oh-ico::before, .ac-oh-ico::after { content: ""; grid-area: 1 / 1; width: 10px; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
.ac-oh-ico::after { transform: rotate(90deg); }
.ac-oh[aria-expanded="true"] .ac-oh-ico { background: var(--ink); border-color: var(--ink); color: #fff; }
.ac-oh[aria-expanded="true"] .ac-oh-ico::after { transform: rotate(0); }
.ac-oh:hover .ac-oh-ico { border-color: var(--ink); }
.ac-ob { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.ac-ob > div { overflow: hidden; }
.ac-order.open .ac-ob { grid-template-rows: 1fr; }
.ac-ob-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); padding: 4px 0 40px; }
.ac-items li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.ac-items li:first-child { border-top: 0; padding-top: 0; }
.ac-items .media { width: 84px; height: 100px; background: var(--panel); }
.ac-items .n { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.ac-items .n a:hover { opacity: .6; }
.ac-items .t { font-size: 13px; color: var(--muted); }
.ac-items .pr { font-size: 15px; }
.ac-side { background: var(--panel); padding: clamp(22px, 2.2vw, 30px); display: grid; gap: 22px; align-content: start; }
.ac-side h4 { margin: 0 0 6px; font-weight: 400; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ac-side p { font-size: 15px; }
.ac-sum div { display: flex; justify-content: space-between; font-size: 15px; padding: 3px 0; }
.ac-sum .tot { border-top: 1px solid #dcdcdc; margin-top: 8px; padding-top: 12px; font-size: 17px; }
.ac-track { font-family: var(--sans); letter-spacing: .08em; }
.ac-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ac-steps span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #a2a2a2; padding-top: 8px; border-top: 2px solid #dcdcdc; }
.ac-steps span.on { color: var(--ink); border-color: var(--ink); }
.ac-side .btn { width: 100%; height: 48px; }

/* Keyframes */
@keyframes ac-clip { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ac-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes ac-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .ac-body { grid-template-columns: 180px minmax(0, 1fr); }
  .ac-ob-in { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .ac-auth { grid-template-columns: 1fr; min-height: 0; }
  .ac-auth-pic { height: 44vh; min-height: 260px; max-height: 420px; }
  .ac-auth-panel { padding: 44px var(--pad) 72px; }
  .ac-top { flex-direction: column; align-items: flex-start; }
  .ac-top-meta { text-align: left; }
  .ac-body { grid-template-columns: 1fr; padding-top: 0; gap: 32px; }
  .ac-nav { position: static; display: flex; overflow-x: auto; gap: 22px; border-bottom: 1px solid var(--line); scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .ac-nav::-webkit-scrollbar { display: none; }
  .ac-nav a, .ac-nav button, .ac-nav a:first-child { width: auto; flex: none; border: 0; padding: 18px 0 14px; margin: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; gap: 6px; }
  .ac-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
  .ac-nav a[aria-current="page"]::after { display: none; }
  .ac-grid, .ac-addr { grid-template-columns: 1fr; }
  .ac-out { grid-template-columns: 1fr; }
  .ac-out .media { aspect-ratio: 4 / 3; order: -1; }
  .ac-oh { grid-template-columns: minmax(0, 1fr) auto 28px; grid-template-areas: "no tot ico" "it st ico"; gap: 12px 14px; padding: 22px 0; }
  .ac-oh-no { grid-area: no; } .ac-oh-items { grid-area: it; } .ac-oh-st { grid-area: st; justify-self: end; } .ac-oh-total { grid-area: tot; } .ac-oh-ico { grid-area: ico; align-self: center; }
}
@media (max-width: 560px) {
  .ac-two { grid-template-columns: 1fr; }
  .ac-items li { grid-template-columns: 64px minmax(0, 1fr); }
  .ac-items .media { width: 64px; height: 78px; }
  .ac-items .pr { grid-column: 2; }
  .ac-oh-no { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-auth-pic .media, .ac-auth-pic .media img, .ac-auth-in, .ac-panel { animation: none !important; }
  .ac-ob, .ac-oh-ico, .ac-oh-ico::after { transition: none !important; }
}

/* Field values in ink (labels are muted) */
.ac-form input, .ac-dash .cform input { color: var(--ink); letter-spacing: 0; text-transform: none; }
.ac-card .ac-lo-txt { color: var(--ink); }
.ac-ct { font-style: normal; }

/* Black and white theme: outlines replace the old grey panel fills */
.ac-card, .ac-flash, .ac-side { border: 1px solid var(--line); }
.ac-pill { border: 1px solid var(--ink); }
