/* AYK Universal Experience / Phase 3
   Clean & Synthetic Minimalism | crisp geometry, flat surfaces, deliberate space.
   Scoped to existing workspaces to preserve product photographs, data,
   current store maintenance and functional forms. No UA/model sniffing. */

.ayk-private-journey,
.inventory,
.chat-shell,
.founder-studio,
.store-product-card {
  --ux-paper:#fcfcf9;
  --ux-surface:#fffefa;
  --ux-ink:#26392e;
  --ux-secondary:#64736a;
  --ux-line:#dfe5dd;
  --ux-line-strong:#cbd6cb;
  --ux-accent:#2d513d;
  --ux-wash:#f3f6f1;
  --ux-radius:9px;
  --ux-space:clamp(16px,2.6vw,28px);
}

/* Accessible, quiet interactions: no blanket animation or glowing shadows. */
.ayk-private-journey :is(a,button,input,select,textarea,summary):focus-visible,
.inventory :is(a,button,input,select,textarea,summary):focus-visible,
.chat-shell :is(a,button,input,textarea):focus-visible,
.founder-studio :is(a,button,input,select,textarea):focus-visible,
.store-product-card :is(a,button):focus-visible {
  outline:2px solid var(--ux-accent);
  outline-offset:2px;
}
.ayk-private-journey :is(button,summary,a),
.inventory :is(button,summary,a),
.chat-shell :is(button,a),
.founder-studio :is(button,a) {
  -webkit-tap-highlight-color:transparent;
}
.ayk-private-journey :is(input,textarea,select),
.inventory :is(input,textarea,select),
.chat-shell textarea,
.founder-studio :is(input,textarea,select) {
  accent-color:var(--ux-accent);
}

/* Collection overview: editorial heading, structured quiet metrics. */
body .page-shell .ayk-collection-overview .collection-top {
  gap:clamp(12px,2.6vw,22px);
  padding-block:6px 12px;
  border-bottom:1px solid var(--ux-line);
}
body .page-shell .ayk-collection-overview .collection-top h1 {
  line-height:1.18;
  color:var(--ux-ink);
}
body .page-shell .ayk-collection-overview .ayk-collection-stats {
  margin-block:18px 2px;
  padding-block:15px;
  border-block:1px solid var(--ux-line);
}
body .page-shell .ayk-collection-overview .ayk-collection-stats > div {
  min-width:0;
  border-color:var(--ux-line);
}
body .page-shell .ayk-collection-overview .ayk-collection-stats strong {
  font-variant-numeric:tabular-nums;
}
body .page-shell .ayk-collection-overview .ayk-collection-tools {
  gap:9px;
  margin-block:15px 20px;
}
body .page-shell .ayk-collection-overview .ayk-collection-tools .button,
body .page-shell .ayk-collection-overview .collection-top > .button {
  border:1px solid var(--ux-line-strong);
  border-radius:var(--ux-radius);
  box-shadow:none;
  background:var(--ux-surface);
  color:var(--ux-accent);
  font-weight:600;
}
body .page-shell .ayk-collection-overview .collection-global-search {
  gap:10px;
  padding-block:18px;
  margin-block:12px 22px;
  border-top:1px solid var(--ux-line);
}
body .page-shell .ayk-private-journey
  :is(.collection-search-row input,.collection-family-search input) {
  border:1px solid var(--ux-line-strong);
  border-radius:var(--ux-radius);
  background:#fff;
  box-shadow:none;
}
body .page-shell .ayk-collection-overview .collection-family-search {
  min-inline-size:0;
}
body .page-shell .ayk-collection-overview .ayk-family-name-list {
  column-gap:clamp(12px,2.5vw,28px);
}
body .page-shell .ayk-collection-overview .ayk-family-name {
  border-color:var(--ux-line);
  min-width:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body .page-shell .ayk-collection-overview .collection-records-grid {
  gap:12px;
}
body .page-shell .ayk-collection-overview .collection-records,
body .page-shell .ayk-collection-overview .collection-history {
  border:1px solid var(--ux-line);
  border-radius:var(--ux-radius);
  background:var(--ux-surface);
  box-shadow:none;
}

/* Collection browser: search and stage/sort controls with clear hierarchy. */
body .page-shell .collection-browser .collection-browser-heading {
  border-bottom:1px solid var(--ux-line);
  padding-block:4px 15px;
  margin-block-end:18px;
}
body .page-shell .collection-browser .collection-browser-controls {
  gap:9px;
  margin-block:12px 16px;
}
body .page-shell .collection-browser .collection-browser-controls :is(input,select) {
  border:1px solid var(--ux-line-strong);
  border-radius:var(--ux-radius);
  box-shadow:none;
  background:#fff;
  color:var(--ux-ink);
}
body .page-shell .collection-browser .collection-filter-panel {
  border:1px solid var(--ux-line);
  border-radius:var(--ux-radius);
  box-shadow:none;
  background:var(--ux-surface);
}
body .page-shell .collection-browser .collection-filter-panel > summary {
  min-height:44px;
  color:var(--ux-ink);
}
body .page-shell .collection-browser .collection-view-switch {
  border-color:var(--ux-line-strong);
  border-radius:var(--ux-radius);
  box-shadow:none;
}
body .page-shell .collection-browser .collection-view-switch button {
  border-radius:6px;
  font-weight:600;
}
body .page-shell .collection-browser .collection-entry {
  border:1px solid var(--ux-line);
  border-radius:var(--ux-radius);
  background:var(--ux-surface);
  box-shadow:none;
}
body .page-shell .collection-browser .collection-entry-body {
  gap:7px;
}
body .page-shell .collection-browser .collection-entry-actions {
  border-top-color:var(--ux-line);
}
body .page-shell .collection-browser .collection-store-badge {
  border:1px solid rgba(255,255,255,.24);
  box-shadow:none;
}

/* Plant passports: retain original media crop, quietly frame metadata and
   founder actions instead of covering the image with decorations. */
body .page-shell .ayk-plant-workspace .passport-showcase,
body .page-shell .ayk-private-journey.is-tabbed .passport-showcase {
  border:1px solid var(--ux-line);
  border-radius:10px;
  background:var(--ux-surface);
  box-shadow:none;
}
body .page-shell .ayk-plant-workspace :is(.passport-identity,.passport-hero-actions) {
  border-color:var(--ux-line);
}
body .page-shell .ayk-plant-workspace .passport-identity > div {
  min-inline-size:0;
}
body .page-shell .ayk-plant-workspace :is(.passport-hero-actions button,
    .passport-hero-actions .button,.passport-hero-actions .outline-button,
    .passport-hero-actions summary) {
  border-radius:var(--ux-radius);
  box-shadow:none;
}
body .page-shell .ayk-plant-workspace .passport-section-nav {
  border-color:var(--ux-line);
}
body .page-shell .ayk-plant-workspace :is(.ayk-workspace-tabs,.ayk-passport-tabs) {
  max-inline-size:100%;
}
body .page-shell .ayk-plant-workspace .ayk-passport-manage :is(.card,input,textarea,select) {
  box-shadow:none;
}
body .page-shell .ayk-plant-workspace .ayk-passport-manage .card {
  border-color:var(--ux-line);
  border-radius:10px;
}

/* Founder inventory: restrained KPI grid, fine section lines, no raised cards. */
body .page-shell .inventory .studio-header {
  border-bottom:1px solid var(--ux-line);
  padding-block:8px 19px;
  margin-block-end:10px;
}
body .page-shell .inventory .studio-tabs {
  gap:7px;
  padding-block:10px 13px;
}
body .page-shell .inventory :is(.studio-tabs,.inv-nav) a {
  border:1px solid var(--ux-line);
  border-radius:8px;
  background:var(--ux-surface);
  color:var(--ux-ink);
  box-shadow:none;
  min-block-size:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
body .page-shell .inventory .studio-tabs a[aria-current="page"] {
  background:var(--ux-accent);
  color:white;
  border-color:var(--ux-accent);
}
body .page-shell .inventory .inventory-cards {
  gap:9px;
  margin-block:17px 20px;
}
body .page-shell .inventory .inventory-card {
  border:1px solid var(--ux-line);
  border-radius:var(--ux-radius);
  background:var(--ux-surface);
  box-shadow:none;
  padding:clamp(12px,1.8vw,17px);
  min-inline-size:0;
  font-variant-numeric:tabular-nums;
}
body .page-shell .inventory .inventory-card strong {
  color:var(--ux-accent);
}
body .page-shell .inventory .inv-panel {
  border:1px solid var(--ux-line);
  border-radius:10px;
  box-shadow:none;
  background:var(--ux-surface);
  margin-block:13px;
}
body .page-shell .inventory .inv-panel :is(input:not([type="checkbox"]),select,textarea) {
  border:1px solid var(--ux-line-strong);
  border-radius:8px;
  box-shadow:none;
}
body .page-shell .inventory .inv-fold > summary {
  color:var(--ux-ink);
  font-weight:600;
}
body .page-shell .inventory .inv-panel button {
  border-radius:8px;
  box-shadow:none;
}
body .page-shell .inventory .inventory-summary-scroll td,
body .page-shell .inventory .inventory-scroll th {
  border-bottom-color:var(--ux-line);
}
body .page-shell .inventory #inventory-groups .inventory-summary-scroll tr {
  background:var(--ux-surface);
  border-color:var(--ux-line);
  box-shadow:none;
}

/* Messages: treat each conversation as a clear, compact document row,
   not a shadow-heavy card. Maintain original bubble ownership alignment. */
body .page-shell .chat-shell {
  border:1px solid var(--ux-line);
  border-radius:10px;
  background:var(--ux-surface);
  box-shadow:none;
}
body .page-shell .chat-shell .chat-head {
  border-color:var(--ux-line);
}
body .page-shell .chat-shell .chat-inbox-item {
  border-color:var(--ux-line);
  min-inline-size:0;
}
body .page-shell .chat-shell :is(.chat-product,.chat-compose) {
  border-color:var(--ux-line);
}
body .page-shell .chat-shell .chat-product {
  background:var(--ux-wash);
  border:1px solid var(--ux-line);
  border-radius:var(--ux-radius);
}
body .page-shell .chat-shell .chat-bubble {
  border-radius:10px;
  border:1px solid var(--ux-line);
  box-shadow:none;
}
body .page-shell .chat-shell .chat-bubble.mine {
  border-color:#d4e0d5;
  background:#edf3ec;
}
body .page-shell .chat-shell .chat-bubble.theirs {
  border-color:var(--ux-line);
  background:#f7f8f5;
}
body .page-shell .chat-shell .chat-unread {
  background:var(--ux-accent);
}
body .page-shell .chat-shell .chat-compose textarea {
  border:1px solid var(--ux-line-strong);
  border-radius:8px;
  box-shadow:none;
  background:#fff;
}
body .page-shell .chat-shell .chat-compose button[type="submit"] {
  background:var(--ux-accent);
  border:1px solid var(--ux-accent);
  border-radius:8px;
  box-shadow:none;
}
body .page-shell .chat-shell .ayk-chat-attach {
  background:var(--ux-surface);
  border:1px solid var(--ux-line);
  border-radius:8px;
}

/* Customer Store: restrained product cards and specimen choice CTAs. */
body .store-product-card {
  border-color:var(--ux-line);
  border-radius:10px;
  box-shadow:none;
}
body .store-product-card .card-info {
  min-inline-size:0;
}
body .store-product-card :is(.ayk-catalog-choose,button) {
  box-shadow:none;
  border-radius:8px;
}
body .store-product-card .ayk-catalog-choose {
  background:var(--ux-wash);
  border:1px solid var(--ux-line-strong);
  color:var(--ux-accent);
}
body .founder-studio :is(.studio-product,.studio-panel,.studio-card,
                         .studio-product-card,.ayk-owner-upload-panel) {
  box-shadow:none;
}
body .founder-studio :is(input,textarea,select) {
  min-inline-size:0;
  max-inline-size:100%;
}

/* Hover is reserved for true pointer devices. Keep touch UI calm. */
@media (hover:hover) and (pointer:fine) {
  body .page-shell .ayk-collection-overview .ayk-family-name:hover {
    background:var(--ux-wash);
  }
  body .page-shell .collection-browser .collection-entry:hover {
    border-color:var(--ux-line-strong);
  }
  body .page-shell .chat-shell .chat-inbox-item:hover {
    background:var(--ux-wash);
  }
  body .page-shell .inventory :is(.studio-tabs,.inv-nav) a:hover {
    border-color:var(--ux-line-strong);
    background:var(--ux-wash);
  }
}

@media (max-width:760px) {
  /* Intentional space, rather than large blank bands. */
  body .page-shell .ayk-private-journey {
    row-gap:clamp(12px,3vw,20px);
  }
  body .page-shell .ayk-collection-overview .collection-top {
    flex-wrap:wrap;
    gap:11px;
  }
  body .page-shell .ayk-collection-overview .collection-top > .button {
    min-block-size:44px;
    padding:9px 13px;
  }
  body .page-shell .ayk-collection-overview .ayk-collection-stats {
    margin-block:14px 5px;
    padding-block:12px;
  }
  body .page-shell .ayk-collection-overview .ayk-collection-stats > div {
    padding-inline:clamp(5px,2.1vw,12px);
  }
  body .page-shell .ayk-collection-overview .ayk-collection-stats > div:first-child {
    padding-inline-start:0;
  }
  body .page-shell .ayk-collection-overview .ayk-collection-stats strong {
    font-size:clamp(20px,6vw,28px);
  }
  body .page-shell .collection-browser .collection-browser-grid {
    gap:10px;
  }
  body .page-shell .collection-browser .collection-entry-body {
    padding:11px;
    gap:6px;
  }
  body .page-shell .collection-browser .collection-browser-heading {
    padding-block-end:12px;
    margin-block-end:13px;
  }
  body .page-shell .ayk-plant-workspace .passport-showcase {
    border-radius:9px;
  }
  body .page-shell .inventory .inventory-cards {
    gap:8px;
  }
  body .page-shell .inventory .inventory-card {
    padding:12px;
  }
  body .page-shell .inventory .inv-panel {
    padding:clamp(12px,3.2vw,17px);
  }
  body .page-shell .inventory #inventory-groups .inventory-summary-scroll tr {
    border-radius:9px;
    padding:11px 12px;
    margin-block-end:8px;
  }
  body .page-shell .chat-shell {
    border-inline:0;
    border-radius:0;
  }
  body .page-shell .chat-shell .chat-head {
    padding:clamp(14px,3.8vw,20px);
  }
  body .page-shell [data-chat-thread] .chat-compose {
    gap:8px;
    padding:12px;
  }
  body .page-shell [data-chat-thread] .chat-compose textarea {
    min-block-size:48px;
  }
}

@media (max-width:360px) {
  body .page-shell .inventory .studio-tabs a {
    padding-inline:10px;
    font-size:12px;
  }
  body .page-shell .ayk-collection-overview .ayk-collection-stats>div {
    padding-inline:5px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .ayk-private-journey *,
  .inventory *,
  .chat-shell * {
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
  }
}


/* Phase 4 — effortless long-list navigation. Native content remains available
   without JavaScript. Defer only DOM presentation after progressive enhancement. */
body .page-shell .ayk-private-journey .ayk-collection-show-more {
  display:flex;justify-content:center;align-items:center;
  width:min(100%,280px);min-height:44px;
  margin:16px auto 5px;padding:10px 18px;
  border:1px solid var(--ux-line-strong,#cbd6cb);
  border-radius:8px;box-shadow:none;background:var(--ux-surface,#fffefa);
  color:var(--ux-accent,#2d513d);font:600 13px/1.35 Arial,Tahoma,sans-serif;
  cursor:pointer;
}
body .page-shell .ayk-private-journey .ayk-collection-show-more:focus-visible{
  outline:2px solid var(--ux-accent,#2d513d);outline-offset:2px;
}
body .page-shell .ayk-private-journey .ayk-collection-visible-count{
  text-align:center;margin:5px 0 12px;color:var(--ux-secondary,#64736a);
  font-size:12px;line-height:1.6;
}
body .page-shell .ayk-private-journey .ayk-collection-show-more[hidden],
body .page-shell .ayk-private-journey .ayk-family-name[hidden],
body .page-shell .collection-browser .collection-entry[hidden]{
  display:none!important;
}

/* Phase 4: a quiet edit shortcut inside existing inventory summary cells. */
body .page-shell .inventory .ayk-inventory-quick-edit{
  display:inline-flex;align-items:center;justify-content:center;
  margin-inline-start:9px;padding:4px 7px;min-height:32px;
  border:1px solid var(--ux-line-strong,#cbd6cb);border-radius:6px;
  background:transparent;color:var(--ux-accent,#2d513d);
  font-size:12px;font-weight:600;line-height:1.2;text-decoration:none;
  box-shadow:none;white-space:nowrap;
}
body .page-shell .inventory .ayk-inventory-quick-edit:focus-visible{
  outline:2px solid var(--ux-accent,#2d513d);outline-offset:2px;
}
body .page-shell .inventory #bulk-edit details.units[open]{
  scroll-margin-block-start:24px;
}
