/* Framework-neutral PHASAN motion contract. No global element resets. */
:root {
  --ph-motion-feedback: 80ms;
  --ph-motion-press: 100ms;
  --ph-motion-hover: 150ms;
  --ph-motion-disclosure: 160ms;
  --ph-motion-menu: 160ms;
  --ph-motion-selection: 180ms;
  --ph-motion-panel: 180ms;
  --ph-motion-navigation: 180ms;
  --ph-motion-exit: 140ms;
  --ph-motion-ease: ease-out;
  --ph-motion-rail-ease: cubic-bezier(.2, .75, .25, 1);
  /* Compatibility aliases for the existing Commerce vocabulary. */
  --ph-motion-fast: var(--ph-motion-hover);
  --ph-motion-standard-ease: var(--ph-motion-ease);
  --ph-nav-motion: var(--ph-motion-navigation) var(--ph-motion-rail-ease);
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --ph-motion-feedback: 0ms;
    --ph-motion-press: 0ms;
    --ph-motion-hover: 0ms;
    --ph-motion-disclosure: 0ms;
    --ph-motion-menu: 0ms;
    --ph-motion-selection: 0ms;
    --ph-motion-panel: 0ms;
    --ph-motion-navigation: 0ms;
    --ph-motion-exit: 0ms;
  }
}

/* State feedback: never delays a native link, disclosure, form or request. */
.button,.text-link,.language,.dashboard-tabs a,.workspace-select select {
  transition: color var(--ph-motion-hover) var(--ph-motion-ease), background-color var(--ph-motion-hover) var(--ph-motion-ease), border-color var(--ph-motion-selection) var(--ph-motion-ease);
}
.button { transition: background-color var(--ph-motion-hover) var(--ph-motion-ease), color var(--ph-motion-hover) var(--ph-motion-ease), transform var(--ph-motion-press) var(--ph-motion-ease); }
.button:active:not([aria-disabled="true"]) { transform: translateY(1px); }
summary > span { display:inline-block; transition:transform var(--ph-motion-disclosure) var(--ph-motion-ease); }
details[open] > summary > span { transform:rotate(45deg); }
.collection-menu { animation:ph-menu-enter var(--ph-motion-menu) var(--ph-motion-ease); }
@keyframes ph-menu-enter { from { opacity:0; transform:translateY(-3px); } to { opacity:1; transform:translateY(0); } }
/* Outcome states remain readable without animation; use native text/role semantics. */
[aria-busy="true"] { cursor:progress; }
[aria-disabled="true"] { cursor:not-allowed; }
@media (prefers-reduced-motion:reduce) {
  .collection-menu { animation:none; }
  .button:active { transform:none; }
  summary > span { transition:none; }
}

:root {
  color-scheme: light;
  --ivory: #faf8f3;
  --paper: #fffdf8;
  --sand: #f1e9dc;
  --sandstone: #d7c6b1;
  --taupe: #746252;
  --cocoa: #6b4e3d;
  --espresso: #2e1f14;
  --ink: #20150c;
  --bronze: #b07d4f;
  --line: rgba(46, 31, 20, .18);
  --sans: "IBM Plex Sans Thai Looped", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5;
  padding: 12px 16px;
  transform: translateY(-150%);
  border: 1px solid var(--espresso);
  background: var(--paper);
  font: 500 12px/1 var(--mono);
}
.skip-link:focus { transform: translateY(0); }
.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.brand img { width: 38px; height: 38px; border: 1px solid var(--sandstone); border-radius: 20%; }
.brand span { display: grid; gap: 4px; }
.brand strong { font-size: 15px; letter-spacing: .2em; }
.brand small { color: var(--taupe); font: 400 8px/1 var(--mono); letter-spacing: .16em; }
.topbar-tools { display: flex; align-items: center; gap: 20px; }
.back-link { color: var(--cocoa); font: 500 10px/1 var(--mono); letter-spacing: .08em; }
.back-link:hover { color: var(--bronze); }
.language-switcher { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); }
.language-switcher button {
  min-width: 38px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--taupe);
  cursor: pointer;
  font: 500 9px/1 var(--mono);
}
.language-switcher button[aria-pressed="true"] { background: var(--espresso); color: var(--ivory); }

.login-card {
  width: min(540px, calc(100% - 40px));
  margin: auto;
  padding: clamp(34px, 6vw, 58px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--bronze);
  background: var(--paper);
}
.eyebrow { margin: 0 0 22px; color: var(--cocoa); font: 500 10px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow > span:first-child { padding-inline: 5px; color: var(--cocoa); }
h1 { margin: 0; font-size: clamp(30px, 6vw, 42px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.intro { margin: 18px 0 30px; color: var(--cocoa); font-size: 15px; line-height: 1.8; }
.google-button {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid var(--espresso);
  background: #fff;
  color: var(--espresso);
  font: 500 12px/1 var(--sans);
  transition: background-color var(--ph-motion-hover) var(--ph-motion-ease), border-color var(--ph-motion-hover) var(--ph-motion-ease);
}
.google-button:hover { border-color: var(--bronze); background: var(--sand); }
.google-button svg { width: 20px; height: 20px; flex: 0 0 20px; }
.google-button.is-disabled { border-color: var(--line); background: var(--sand); color: var(--taupe); cursor: not-allowed; }
.login-status { min-height: 24px; margin: 14px 0 0; color: var(--taupe); font-size: 12px; line-height: 1.6; }
.privacy-note { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--taupe); font-size: 11px; line-height: 1.7; }
footer {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(20px, 5vw, 76px);
  border-top: 1px solid var(--line);
  color: var(--taupe);
  font: 400 8px/1.6 var(--mono);
  letter-spacing: .08em;
}

@media (max-width: 560px) {
  .topbar { min-height: 72px; padding-inline: 18px; }
  .brand small { display: none; }
  .topbar-tools { gap: 10px; }
  .back-link { display: none; }
  .login-card { width: calc(100% - 28px); padding: 30px 22px; }
  footer { align-items: start; flex-direction: column; gap: 4px; padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.language-switcher button { min-height:44px; min-width:44px; transition:background-color var(--ph-motion-selection) var(--ph-motion-ease),color var(--ph-motion-selection) var(--ph-motion-ease); }
.back-link { display:inline-flex; align-items:center; min-height:44px; }
.google-button:active:not(.is-disabled) { background:var(--sand); }
