/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

*, ::before, ::after{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.\!container{
  width: 100% !important;
}
.container{
  width: 100%;
}
@media (min-width: 640px){

  .\!container{
    max-width: 640px !important;
  }

  .container{
    max-width: 640px;
  }
}
@media (min-width: 768px){

  .\!container{
    max-width: 768px !important;
  }

  .container{
    max-width: 768px;
  }
}
@media (min-width: 1024px){

  .\!container{
    max-width: 1024px !important;
  }

  .container{
    max-width: 1024px;
  }
}
@media (min-width: 1280px){

  .\!container{
    max-width: 1280px !important;
  }

  .container{
    max-width: 1280px;
  }
}
@media (min-width: 1536px){

  .\!container{
    max-width: 1536px !important;
  }

  .container{
    max-width: 1536px;
  }
}
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.visible{
  visibility: visible;
}
.fixed{
  position: fixed;
}
.block{
  display: block;
}
.inline{
  display: inline;
}
.flex{
  display: flex;
}
.table{
  display: table;
}
.hidden{
  display: none;
}
.transform{
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.filter{
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

:root {
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mind-navy: #101d35;
  --sync-blue: #1262f1;
  --flow-cyan: #0aa5ee;
  --ease-teal: #16d5c6;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --border: #e6ebf2;
  --border-strong: #dce5f0;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --success: #059669;
  --warning: #b45309;
  --danger: #dc2626;
  --header-height: 104px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow-soft: 0 22px 60px rgba(16, 29, 53, 0.08);
  --shadow-drawer: 0 28px 90px rgba(16, 29, 53, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--mind-navy);
  font-family: var(--font-sans);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { min-height: 100vh; --assistant-panel-width: 460px; transition: padding-right 220ms ease; }
@media (min-width: 761px) {
  .app-shell--assistant-open { padding-right: var(--assistant-panel-width); }
  .app-shell--assistant-open .drawer-layer { right: var(--assistant-panel-width); }
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}
.brand-logo-link {
  display: inline-flex;
  min-width: 0;
  align-items: center;
}
.brand-logo {
  display: block;
  max-width: calc(100vw - 116px);
  -o-object-fit: contain;
     object-fit: contain;
}
.brand-icon {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  -o-object-fit: contain;
     object-fit: contain;
}
.hamburger-button {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}
.hamburger-button:hover,
.hamburger-button:focus-visible {
  background: rgba(22, 213, 198, 0.18);
  outline: none;
}
.hamburger-button:active { transform: scale(0.97); }
.app-content {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px 24px 96px;
}

.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  visibility: hidden;
  pointer-events: none;
}
.drawer-layer--open {
  visibility: visible;
  pointer-events: auto;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  background: rgba(16, 29, 53, 0.48);
  cursor: default;
  transition: opacity 180ms ease;
}
.drawer-layer--open .drawer-backdrop { opacity: 1; }
.navigation-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100dvh;
  border-left: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  transition: transform 220ms ease;
}
.drawer-layer--open .navigation-drawer { transform: translateX(0); }
.navigation-drawer {
  display: flex;
  width: min(430px, 92vw);
  flex-direction: column;
  overflow: hidden;
}
.navigation-drawer__header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.navigation-drawer__header .brand-logo { height: 65px !important; }
.navigation-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.navigation-user__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.navigation-user__identity strong,
.navigation-user__identity small { display: block; }
.navigation-user__identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.navigation-user__identity small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.navigation-user__avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #d8e9ff;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--sync-blue);
}
.ai-ready {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.ai-ready > span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ease-teal);
}
.navigation-drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px 24px;
}
.navigation-section + .navigation-section { margin-top: 22px; }
.navigation-section__label,
.assistant-group-label,
.eyebrow {
  margin: 0 0 9px;
  color: var(--sync-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.navigation-section__label { color: var(--muted-light); }
.navigation-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 9px;
  border-bottom: 1px solid var(--border);
  color: #334155;
  font-size: 14px;
  font-weight: 750;
  transition: color 150ms ease, background-color 150ms ease;
}
.navigation-link svg { color: var(--sync-blue); }
.navigation-link:hover,
.navigation-link:focus-visible,
.navigation-link--active {
  border-radius: 12px;
  background: #f4f9ff;
  color: var(--sync-blue);
  outline: none;
}
.navigation-submenu { padding: 5px 0 8px 35px; }
.navigation-submenu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.navigation-submenu a:hover { color: var(--sync-blue); }
.navigation-submenu__bullet {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--sync-blue);
}
.navigation-drawer__footer {
  display: grid;
  gap: 9px;
  padding: 16px 20px 22px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.navigation-create-project { justify-content: center; }
.navigation-signout { justify-content: center; }

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 15px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, opacity 150ms ease;
}
.ui-button:disabled { cursor: not-allowed; opacity: 0.55; }
.ui-button:not(:disabled):active { transform: translateY(1px); }
.ui-button--md { min-height: 44px; padding: 10px 16px; font-size: 13px; }
.ui-button--sm { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.ui-button--icon { width: 44px; height: 44px; padding: 0; border-radius: 13px; }
.ui-button--primary { border-color: var(--sync-blue); background: var(--sync-blue); color: #fff; }
.ui-button--primary:hover { background: #0d55d4; }
.ui-button--secondary { background: #fff; color: var(--mind-navy); }
.ui-button--secondary:hover { border-color: #bfd5fb; background: #f8fbff; }
.ui-button--ghost { border-color: transparent; background: transparent; color: var(--muted); }
.ui-button--ghost:hover { background: #f2f6fb; color: var(--mind-navy); }
.ui-button--danger { border-color: #fecaca; background: #fff5f5; color: var(--danger); }

.assistant-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 17px 9px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.assistant-launcher:hover,
.assistant-launcher:focus-visible { border-color: rgba(22, 213, 198, 0.8); outline: none; }
.assistant-launcher .brand-icon { width: 40px; height: 40px; }
@media (min-width: 761px) {
  .app-shell--assistant-open .assistant-launcher { right: calc(var(--assistant-panel-width) + 20px); }
}
.assistant-split-layer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: var(--assistant-panel-width);
  visibility: hidden;
  pointer-events: none;
}
.assistant-split-layer--open {
  visibility: visible;
}
.assistant-split-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-drawer);
  overflow: hidden;
  pointer-events: auto;
  transform: translateX(100%);
  transition: transform 220ms ease;
}
.assistant-split-layer--open .assistant-split-panel { transform: translateX(0); }
.assistant-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  z-index: 2;
  width: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
}
.assistant-resize-handle::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: rgba(18, 98, 241, 0.12);
  opacity: 0;
  transition: opacity 160ms ease, background-color 160ms ease;
}
.assistant-resize-handle:hover::after,
.assistant-resize-handle:focus-visible::after,
body.assistant-resizing .assistant-resize-handle::after {
  background: rgba(22, 213, 198, 0.95);
  opacity: 1;
}
.assistant-resize-handle:focus-visible { outline: none; }
body.assistant-resizing {
  cursor: col-resize;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.assistant-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.assistant-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.assistant-header__brand .brand-icon { width: 48px; height: 48px; }
.assistant-header__brand strong,
.assistant-header__brand small { display: block; }
.assistant-header__brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.assistant-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: 330px minmax(0, 1fr);
}
.assistant-history {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: #fbfcff;
}
.assistant-history__toolbar {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.assistant-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
}
.assistant-search input {
  min-width: 0;
  flex: 1;
  padding: 11px 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
}
.assistant-history__list { padding: 16px; }
.assistant-history-item {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.assistant-history-item:hover,
.assistant-history-item--active {
  border-color: #d9e8ff;
  background: #fff;
}
.assistant-history-item__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: #eef6ff;
  color: var(--sync-blue);
}
.assistant-history-item__copy strong,
.assistant-history-item__copy small { display: block; }
.assistant-history-item__copy strong { color: #26364f; font-size: 12px; line-height: 1.35; }
.assistant-history-item__copy small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.assistant-history-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: var(--muted-light);
}
.assistant-history-item__meta small { font-size: 9px; }
.assistant-conversation {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}
.assistant-conversation__context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.assistant-conversation__context h2 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.scope-selector { display: grid; gap: 5px; }
.scope-selector > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.scope-selector select {
  min-width: 130px;
  padding: 9px 34px 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.assistant-memory-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 22px 0;
  padding: 12px 14px;
  border: 1px solid #dceafe;
  border-radius: 16px;
  background: #f7fbff;
  color: var(--sync-blue);
}
.assistant-memory-note p { flex: 1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.assistant-messages {
  display: grid;
  min-height: 0;
  flex: 1;
  gap: 12px;
  overflow-y: auto;
  padding: 20px 22px;
  align-content: start;
}
.chat-message {
  max-width: 78%;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.65;
}
.chat-message p { margin: 5px 0 0; }
.chat-message--assistant { border: 1px solid #dceafe; background: #eef6ff; }
.chat-message--assistant p { color: #40536e; }
.chat-message--user { justify-self: end; background: var(--mind-navy); color: #fff; }
.chat-message--user p { margin: 0; color: #fff; }
.assistant-composer {
  margin: 0 22px 22px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(16, 29, 53, 0.07);
}
.assistant-composer textarea {
  width: 100%;
  min-height: 78px;
  resize: none;
  border: 0;
  outline: none;
  color: var(--mind-navy);
}
.assistant-composer__actions { display: flex; justify-content: flex-end; gap: 8px; }

.ui-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
}
.ui-card--soft { background: var(--surface-soft); }
.ui-card--hero {
  border: 0;
  background: radial-gradient(circle at top right, rgba(22, 213, 198, 0.34), transparent 30%), linear-gradient(135deg, var(--sync-blue), var(--flow-cyan) 55%, var(--ease-teal));
  color: #fff;
}
.ui-card--hero p { color: rgba(255, 255, 255, 0.86); }
.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: -moz-fit-content;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.ui-badge--success { border-color: #bbf7d0; background: #f0fdf4; color: #047857; }
.ui-badge--blue { border-color: #d6e6ff; background: #f2f7ff; color: var(--sync-blue); }
.ui-badge--warning { border-color: #fde68a; background: #fffbeb; color: var(--warning); }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-heading h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}
.page-heading__description { max-width: 780px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.page-heading__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.dashboard-stack { display: grid; gap: 22px; }
.hero-panel { min-height: 320px; display: flex; flex-direction: column; justify-content: center; }
.hero-panel h1 { margin: 0; max-width: 850px; font-size: clamp(38px, 7vw, 68px); line-height: 1.02; letter-spacing: -0.06em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-actions .ui-button--secondary { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.12); color: #fff; }
.content-grid { display: grid; gap: 18px; }
.content-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-heading { margin-bottom: 15px; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -0.035em; }
.section-heading p { margin: 7px 0 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.metric { padding: 14px; border: 1px solid var(--border); border-radius: 17px; background: #fbfcff; }
.metric strong { display: block; font-size: 28px; line-height: 1; letter-spacing: -0.04em; }
.metric small { display: block; margin-top: 6px; color: var(--muted); font-weight: 700; }
.list-stack { display: grid; gap: 10px; }
.list-card { display: block; padding: 15px; border: 1px solid var(--border); border-radius: 17px; background: #fff; }
.list-card:hover { border-color: #bdd6ff; }
.list-card strong { display: block; }
.list-card small { display: block; margin-top: 5px; color: var(--muted); }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 15px; }
.form-control { display: grid; gap: 7px; }
.form-control span { color: #334155; font-size: 12px; font-weight: 800; }
.form-control input,
.form-control select,
.form-control textarea,
.inline-form input,
.inline-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--mind-navy);
  outline: none;
}
.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus,
.inline-form input:focus,
.inline-form select:focus { border-color: var(--sync-blue); box-shadow: 0 0 0 4px rgba(18, 98, 241, 0.08); }
.form-control textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-control--full { grid-column: 1 / -1; }
.form-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-error { padding: 12px 14px; border: 1px solid #fecaca; border-radius: 14px; background: #fff5f5; color: #b91c1c; font-size: 12px; }

.field-error { color: #b91c1c !important; font-size: 11px !important; font-weight: 700 !important; }
.PhoneInput {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.PhoneInput:focus-within {
  border-color: var(--sync-blue);
  box-shadow: 0 0 0 4px rgba(18, 98, 241, 0.08);
}
.PhoneInputCountry {
  margin: 0;
  padding: 0 10px 0 13px;
  border-right: 1px solid var(--border);
}
.PhoneInputCountrySelect { cursor: pointer; }
.PhoneInputCountryIcon { width: 24px; height: 17px; box-shadow: none; }
.PhoneInputCountrySelectArrow { color: var(--muted); opacity: 1; }
.form-control .PhoneInputInput {
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0 14px 14px 0;
  outline: none;
  box-shadow: none;
}
.form-control .PhoneInputInput:focus { border: 0; box-shadow: none; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background: radial-gradient(circle at top right, rgba(22, 213, 198, 0.14), transparent 30%), var(--background);
}
.auth-card {
  width: min(590px, 100%);
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.auth-logo { display: flex; justify-content: center; margin: -6px 0 20px; }
.auth-logo .brand-logo { height: 125px !important; max-width: 100%; }
.auth-copy { margin-bottom: 24px; }
.auth-copy h1 { margin: 0; font-size: clamp(31px, 6vw, 44px); letter-spacing: -0.05em; }
.auth-copy p { margin: 10px 0 0; color: var(--muted); line-height: 1.65; }
.auth-footer { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-footer a { color: var(--sync-blue); font-weight: 800; }
.auth-actions { display: grid; gap: 10px; margin-top: 4px; }
.auth-secondary-link { color: var(--sync-blue); font-size: 12px; font-weight: 800; text-align: right; }

.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.board-search { display: flex; min-width: 240px; flex: 1; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--muted); }
.board-search input { width: 100%; padding: 11px 0; border: 0; outline: 0; }
.board-grid { display: grid; grid-template-columns: repeat(7, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.board-column { min-height: 500px; padding: 14px; border: 1px solid var(--border); border-radius: 22px; background: #f7f9fd; }
.board-column__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.board-column__header h2 { margin: 0; font-size: 14px; }
.task-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: #fff; cursor: pointer; text-align: left; }
.task-card:hover { border-color: #bdd6ff; box-shadow: 0 10px 28px rgba(16,29,53,.06); }
.task-card__top, .task-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-card h3 { margin: 0; font-size: 13px; line-height: 1.45; }
.task-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.task-card__meta { color: var(--muted); font-size: 10px; }
.task-detail-layer { position: fixed; inset: 0; z-index: 65; visibility: hidden; pointer-events: none; }
.task-detail-layer--open { visibility: visible; pointer-events: auto; }
.task-detail-layer--open .drawer-backdrop { opacity: 1; }
.task-detail-drawer { position: absolute; top: 0; right: 0; width: min(520px, 95vw); height: 100dvh; overflow-y: auto; padding: 22px; border-left: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-drawer); transform: translateX(100%); transition: transform 220ms ease; }
.task-detail-layer--open .task-detail-drawer { transform: translateX(0); }
.task-detail-header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.task-detail-header h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -0.04em; }
.task-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

@media (max-width: 980px) {
  .content-grid--4, .content-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assistant-layout { grid-template-columns: 290px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --header-height: 98px; }
  .app-header { padding: 0 14px; }
  .brand-logo { height: 76px !important; max-width: calc(100vw - 92px); }
  .hamburger-button { width: 54px; height: 54px; flex-basis: 54px; }
  .app-content { padding: 22px 16px 94px; }
  .assistant-launcher { right: 14px; bottom: 14px; }
  .assistant-launcher span { display: none; }
  .assistant-launcher { width: 60px; height: 60px; padding: 8px; justify-content: center; }
  .assistant-layout { display: flex; flex-direction: column; overflow-y: auto; }
  .assistant-history { max-height: 285px; border-right: 0; border-bottom: 1px solid var(--border); }
  .assistant-conversation { min-height: 620px; }
  .assistant-conversation__context { align-items: stretch; flex-direction: column; }
  .scope-selector select { width: 100%; }
  .assistant-memory-note { align-items: flex-start; flex-wrap: wrap; }
  .chat-message { max-width: 92%; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .content-grid--4, .content-grid--3, .content-grid--2, .form-grid { grid-template-columns: 1fr; }
  .form-control--full { grid-column: auto; }
  .auth-card { padding: 26px 20px; }
  .auth-logo .brand-logo { height: 125px !important; }
  .navigation-user { align-items: flex-start; flex-direction: column; }
  .app-shell--assistant-open { padding-right: 0; }
  .app-shell--assistant-open .assistant-launcher { display: none; }
  .assistant-split-layer { left: 0; width: 100%; z-index: 75; }
  .assistant-split-panel { border-left: 0; }
  .assistant-resize-handle { display: none; }
}


/* Step 6 task-management vertical slice */
.inline-notice { padding: 12px 15px; border: 1px solid #bceee8; border-radius: 14px; background: #effcf9; color: #08766d; font-size: 13px; font-weight: 750; }
.board-column { transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.board-column--over { border-color: var(--sync-teal); background: #eefdfb; box-shadow: 0 0 0 4px rgba(22,213,198,.12); }
.board-column__header > div { display: grid; gap: 3px; }
.board-column__header small { color: var(--muted); font-size: 10px; }
.board-column__empty { display: grid; min-height: 82px; place-items: center; border: 1px dashed #cfd9e8; border-radius: 16px; color: var(--muted); font-size: 11px; }
.task-card { padding: 0; overflow: hidden; }
.task-card--dragging { z-index: 5; opacity: .65; box-shadow: 0 18px 45px rgba(16,29,53,.15); }
.task-card__top { padding: 10px 10px 0 13px; }
.task-card__body { display: grid; width: 100%; gap: 10px; padding: 4px 13px 13px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.task-card__badges { display: flex; flex-wrap: wrap; gap: 5px; }
.task-drag-handle { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: grab; }
.task-drag-handle:hover { background: rgba(22,213,198,.14); color: var(--navy); }
.task-drag-handle:active { cursor: grabbing; }
.task-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.modal-layer { position: fixed; inset: 0; z-index: 70; visibility: hidden; pointer-events: none; }
.modal-layer--open { visibility: visible; pointer-events: auto; }
.modal-layer--open .drawer-backdrop { opacity: 1; }
.task-create-modal { position: absolute; top: 50%; left: 50%; width: min(650px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; border: 1px solid var(--border); border-radius: 26px; background: #fff; box-shadow: var(--shadow-drawer); transform: translate(-50%, -47%) scale(.98); opacity: 0; transition: opacity 180ms ease, transform 180ms ease; }
.modal-layer--open .task-create-modal { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.dependency-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dependency-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.dependency-add select { min-width: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 13px; background: #fff; color: var(--navy); }
.empty-copy { margin: 0; color: var(--muted); font-size: 12px; }

@media (max-width: 620px) {
  .dependency-add { grid-template-columns: 1fr; }
  .task-create-modal { padding: 20px; }
}


/* v0.1.6 workspace, project creation, and Viewr interaction refinements */
.workspace-card-link { display: block; color: inherit; text-decoration: none; }
.workspace-card-link .ui-card { height: 100%; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.workspace-card-link:hover .ui-card { transform: translateY(-2px); border-color: #b8d4ff; box-shadow: 0 18px 42px rgba(16,29,53,.08); }
.workspace-card-link:focus-visible { outline: 3px solid rgba(22,213,198,.34); outline-offset: 5px; border-radius: var(--radius-lg); }
.workspace-card-link__action { display: inline-flex; margin-top: 14px; color: var(--sync-blue); font-size: 13px; font-weight: 800; }

.existing-workspaces { display: grid; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.existing-workspaces > strong { font-size: 13px; }
.existing-workspaces > small { color: var(--muted); }
.existing-workspaces__list { display: flex; flex-wrap: wrap; gap: 8px; }
.existing-workspaces__list a { padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--sync-blue); font-size: 12px; font-weight: 800; }
.existing-workspaces__list a:hover { border-color: #b8d4ff; background: #f5f9ff; }

.empty-state-panel { display: grid; justify-items: start; gap: 10px; padding: 20px; border: 1px dashed #cbd8e8; border-radius: 20px; background: #fbfdff; }
.empty-state-panel h2, .empty-state-panel h3, .empty-state-panel p { margin: 0; }
.empty-state-panel p, .helper-text { color: var(--muted); }
.helper-text { margin-top: 16px; font-size: 13px; }
.list-card__row, .section-heading__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.list-card__badges { display: flex; gap: 7px; flex-wrap: wrap; }
.text-link { color: var(--sync-blue); font-size: 13px; font-weight: 800; }

.demo-panel { border-style: dashed; }
.viewr-block-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: minmax(118px, auto); gap: 12px; }
.viewr-project-block { min-height: 125px; padding: 18px; border-radius: 22px; color: #fff; background: linear-gradient(135deg,var(--sync-blue),var(--flow-cyan)); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease; }
.viewr-project-block:nth-child(even) { background: linear-gradient(135deg,var(--flow-cyan),var(--ease-teal)); }
.viewr-project-block:hover { transform: translateY(-2px); box-shadow: 0 18px 35px rgba(18,98,241,.18); }
.viewr-project-block--large { min-height: 190px; grid-row: span 2; }
.viewr-project-block--demo { border: 2px dashed rgba(255,255,255,.62); cursor: default; opacity: .88; }
.viewr-project-block--demo:hover { transform: none; box-shadow: none; }
.viewr-project-block__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

@media (max-width: 680px) {
  .viewr-block-grid { grid-template-columns: 1fr; }
  .viewr-project-block--large { grid-row: auto; min-height: 150px; }
}

/* v0.1.8 stage navigation and AI-first task creation */
.metric--link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.metric--link:hover {
  transform: translateY(-2px);
  border-color: #b8d4ff;
  background: #f5f9ff;
  box-shadow: 0 14px 32px rgba(16,29,53,.07);
}
.metric--link:focus-visible {
  outline: 3px solid rgba(22,213,198,.38);
  outline-offset: 3px;
}
.board-column--focused {
  border-color: var(--sync-teal);
  background: #f0fffc;
  box-shadow: 0 0 0 5px rgba(22,213,198,.15), 0 18px 42px rgba(16,29,53,.08);
}
.board-column__actions {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 6px !important;
}
.task-create-modal--ai {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
}
.ai-task-builder {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  min-height: 570px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
}
.ai-task-chat {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  min-width: 0;
  border-right: 1px solid var(--border);
  background: #f8fbff;
}
.ai-task-chat__intro {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--sync-blue);
}
.ai-task-chat__intro strong,
.ai-task-chat__intro small { display: block; }
.ai-task-chat__intro small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.ai-task-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  padding: 18px;
}
.ai-task-message {
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 17px;
  font-size: 12px;
  line-height: 1.55;
}
.ai-task-message strong { display: block; margin-bottom: 4px; font-size: 11px; }
.ai-task-message p { margin: 0; color: inherit; }
.ai-task-message--assistant {
  align-self: flex-start;
  border: 1px solid #d9e8ff;
  border-bottom-left-radius: 6px;
  background: #eef6ff;
  color: #253a57;
}
.ai-task-message--user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--mind-navy);
  color: #fff;
}
.ai-task-composer {
  display: grid;
  gap: 10px;
  padding: 15px 18px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.ai-task-composer textarea { min-height: 96px; }
.ai-task-composer .ui-button { justify-self: start; }
.ai-task-review {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
}
.ai-task-review__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.ai-task-review__heading h3 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.03em; }
.ai-task-review__empty {
  display: grid;
  min-height: 430px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 36px;
  border: 1px dashed #cbd8e8;
  border-radius: 20px;
  background: #fbfdff;
  color: var(--muted);
  text-align: center;
}
.ai-task-review__empty strong { color: var(--mind-navy); font-size: 18px; }
.ai-task-review__empty p { max-width: 420px; margin: 0; line-height: 1.65; }

@media (max-width: 900px) {
  .task-create-modal--ai { width: min(760px, calc(100vw - 24px)); }
  .ai-task-builder { grid-template-columns: 1fr; }
  .ai-task-chat { min-height: 480px; border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 620px) {
  .task-create-modal--ai { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); padding: 16px; border-radius: 20px; }
  .ai-task-review, .ai-task-chat__messages, .ai-task-composer { padding-left: 14px; padding-right: 14px; }
  .ai-task-review__heading { flex-direction: column; }
}


/* Step 6 v0.1.9: ready queue navigation and AI-first task workspace */
.list-card--link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: inherit;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.list-card--link:hover {
  border-color: #9fc4ff;
  background: #f8fbff;
  transform: translateY(-1px);
}
.list-card--link:focus-visible {
  outline: 3px solid rgba(18, 98, 241, .2);
  outline-offset: 2px;
}
.task-detail-drawer--ai {
  width: min(1180px, 97vw);
  padding: 22px;
}
.task-detail-header p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.task-edit-ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  min-height: calc(100dvh - 145px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
}
.task-edit-ai-chat {
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr) auto;
  min-width: 0;
  border-right: 1px solid var(--border);
  background: #f8fbff;
}
.task-phase-guidance {
  display: grid;
  gap: 9px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.task-phase-guidance .ui-badge { justify-self: start; }
.task-phase-guidance p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.task-edit-ai-chat__messages { min-height: 320px; }
.task-edit-ai-composer small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.task-edit-fields {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
  background: #fff;
}
.task-detail-actions--sticky {
  position: sticky;
  bottom: -1px;
  z-index: 2;
  padding: 14px 0 4px;
  background: linear-gradient(to top, #fff 78%, rgba(255,255,255,0));
}
@media (max-width: 980px) {
  .task-edit-ai-layout { grid-template-columns: 1fr; overflow: visible; }
  .task-edit-ai-chat { min-height: 560px; border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 620px) {
  .task-detail-drawer--ai { width: 100vw; padding: 14px; }
  .task-edit-fields, .task-phase-guidance, .task-edit-ai-chat__messages, .task-edit-ai-composer { padding-left: 14px; padding-right: 14px; }
}


/* Step 6 v0.1.10 — 4-hour session renewal */
.form-notice {
  border: 1px solid rgba(18, 98, 241, .22);
  border-radius: 16px;
  background: #eef6ff;
  color: #17416f;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.5;
}

.session-expiry-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.session-expiry-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 29, 53, .62);
  backdrop-filter: blur(7px);
}

.session-expiry-dialog {
  position: relative;
  width: min(540px, 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-drawer);
  padding: 26px;
}

.session-expiry-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 14px;
}

.session-expiry-brand .eyebrow { margin: 0 0 4px; }
.session-expiry-brand h2 { margin: 0; }

.session-expiry-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(18, 98, 241, .10), rgba(22, 213, 198, .18));
  flex: 0 0 auto;
}

.session-expiry-icon img {
  width: 36px;
  height: 36px;
  -o-object-fit: contain;
     object-fit: contain;
}

.session-expiry-time-card {
  display: grid;
  gap: 7px;
  margin: 20px 0;
  padding: 17px;
  border: 1px solid #dceafe;
  border-radius: 19px;
  background: #f7fbff;
}

.session-expiry-time-card span,
.session-expiry-time-card small { color: var(--muted); }
.session-expiry-time-card strong { color: var(--navy); line-height: 1.45; }

.session-expiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 20px;
}

@media (max-width: 560px) {
  .session-expiry-layer { padding: 12px; }
  .session-expiry-dialog { padding: 20px; border-radius: 22px; }
  .session-expiry-actions { display: grid; }
  .session-expiry-actions button { width: 100%; justify-content: center; }
}

/* Step 7 persistent multi-chat and memory */
.persistent-chat { min-height: 620px; display: grid; grid-template-columns: 285px minmax(0,1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: #fff; }
.assistant-split-panel .persistent-chat { min-height: 0; height: calc(100vh - 81px); border: 0; border-radius: 0; }
.persistent-chat__history { min-width: 0; border-right: 1px solid var(--border); background: #fbfcff; overflow-y: auto; }
.persistent-chat__history-head { padding: 16px 16px 8px; }
.persistent-chat__history .assistant-search { margin: 0 16px 10px; }
.persistent-chat__thread-list { padding: 0 12px 18px; }
.persistent-chat__conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.persistent-chat__conversation .assistant-conversation__context { flex: 0 0 auto; }
.persistent-chat__conversation .assistant-memory-note { margin: 0 18px; }
.persistent-chat__conversation .assistant-messages { flex: 1 1 auto; min-height: 280px; max-height: none; }
.persistent-chat__conversation .assistant-composer { flex: 0 0 auto; }
.chat-thread-actions { display: flex; align-items: center; gap: 4px; }
.memory-toggle { padding: 0; border: 0; background: transparent; cursor: pointer; }
.chat-message small { display: block; margin-top: 7px; opacity: .72; font-size: 10px; }
@media (max-width: 760px) {
  .persistent-chat { display: flex; flex-direction: column; min-height: 720px; }
  .persistent-chat__history { max-height: 250px; border-right: 0; border-bottom: 1px solid var(--border); }
  .persistent-chat__conversation { min-height: 520px; }
}
.task-card__quick-actions { display: inline-flex; align-items: center; gap: 4px; }
.task-chat-button { width: 30px; height: 30px; border: 0; border-radius: 999px; display: grid; place-items: center; color: var(--mind-blue); background: #eef6ff; cursor: pointer; }
.task-chat-button:hover, .task-chat-button:focus-visible { background: rgba(22,213,198,.2); outline: 2px solid rgba(22,213,198,.45); }

/* Step 7 v0.1.1 stabilization hotfixes */
.hero-actions--neutral .ui-button--secondary {
  border-color: var(--border);
  background: #fff;
  color: var(--mind-navy);
}

.approval-list {
  display: grid;
  gap: 14px;
}

.approval-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.approval-card__content h2 {
  margin: 12px 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.approval-card__content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.approval-card__meta,
.approval-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.approval-card__actions {
  justify-content: flex-end;
}

.project-ai-chat {
  display: grid;
  gap: 14px;
}

.project-ai-chat__messages {
  display: flex;
  min-height: 260px;
  max-height: 360px;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f8fbff;
}

.project-ai-chat__composer {
  margin: 0;
}

@media (max-width: 720px) {
  .approval-card {
    grid-template-columns: 1fr;
  }
  .approval-card__actions {
    justify-content: flex-start;
  }
  .approval-card__actions .ui-button {
    flex: 1 1 130px;
  }
}

/* Step 7 v0.1.3 UI stabilization hotfixes */
.app-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
.header-user-pill {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 29, 53, .05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.header-user-pill:hover,
.header-user-pill:focus-visible {
  border-color: rgba(22, 213, 198, .55);
  box-shadow: 0 16px 42px rgba(16, 29, 53, .09);
  outline: none;
}
.header-user-pill:active { transform: scale(.98); }
.header-user-pill__avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #dbe8ff;
  border-radius: 999px;
  background: #eff5ff;
  color: var(--sync-blue);
}
.header-user-pill strong,
.header-user-pill small { display: block; }
.header-user-pill strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--mind-navy);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-user-pill small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.persistent-chat--history-collapsed {
  grid-template-columns: 56px minmax(0, 1fr);
}
.persistent-chat__history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.persistent-chat__rail {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  padding: 14px 8px;
  border-right: 1px solid var(--border);
  background: #fbfcff;
}
.persistent-chat__rail-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--mind-navy);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.persistent-chat__rail-button:hover,
.persistent-chat__rail-button:focus-visible {
  border-color: rgba(22, 213, 198, .65);
  background: rgba(22, 213, 198, .12);
  color: var(--sync-blue);
  outline: none;
}
.task-card {
  cursor: grab;
}
.task-card:active,
.task-card--dragging {
  cursor: grabbing;
}
.task-card__body {
  cursor: inherit;
}
.task-drag-handle {
  pointer-events: none;
}

@media (max-width: 980px) {
  .header-user-pill strong { max-width: 130px; }
}

@media (max-width: 760px) {
  .app-header__actions { gap: 6px; }
  .header-user-pill {
    padding: 6px;
    border-radius: 999px;
  }
  .header-user-pill > span:last-child { display: none; }
  .header-user-pill__avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .persistent-chat--history-collapsed { grid-template-columns: 1fr; }
  .persistent-chat__rail {
    display: flex;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}
.app-header > .brand-logo-link {
  flex: 1 1 auto;
  min-width: 96px;
  overflow: hidden;
}
.app-header > .brand-logo-link .brand-logo {
  max-width: min(320px, 100%);
}
@media (max-width: 760px) {
  .app-header > .brand-logo-link .brand-logo {
    max-width: min(190px, 100%);
  }
}

/* Step 7 v0.1.4 UX/session stabilization hotfixes */
.page-heading__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.page-heading__eyebrow-row .eyebrow { margin: 0; }
.page-history-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.page-history-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.page-history-button:hover,
.page-history-button:focus-visible {
  border-color: rgba(22, 213, 198, .65);
  background: rgba(22, 213, 198, .1);
  color: var(--mind-navy);
  outline: none;
}
.composer-shortcut-hint {
  align-self: center;
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}
.dashboard-approval-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.dashboard-approval-card__copy { min-width: 0; }
.dashboard-approval-card__copy strong,
.dashboard-approval-card__copy small { display: block; }
.dashboard-approval-card__copy small { margin-top: 4px; color: var(--muted); }
.dashboard-approval-card__actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.checklist-editor {
  display: grid;
  gap: 14px;
}
.checklist-group {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}
.checklist-group__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.checklist-group__header input,
.checklist-item input[type="text"],
.checklist-item input:not([type]) {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 11px;
  outline: none;
}
.checklist-group__items {
  display: grid;
  gap: 8px;
}
.checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sync-blue);
}
.checklist-item button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.product-tabs {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 29, 53, .05);
}
.product-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}
.product-tab--active {
  background: linear-gradient(135deg, var(--sync-blue), var(--flow-cyan));
  color: #fff;
}
.planr-board { display: grid; gap: 18px; }
.planr-calendar {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.planr-day {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fbfcff;
}
.planr-day__date {
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--sync-blue);
}
.planr-day__date strong { color: var(--mind-navy); }
.planr-day__date small { color: var(--muted); }
.planr-day__tasks {
  display: grid;
  gap: 10px;
}
.planr-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.planr-task:hover,
.planr-task:focus-visible {
  border-color: #bdd6ff;
  box-shadow: 0 10px 26px rgba(16,29,53,.06);
  outline: none;
  transform: translateY(-1px);
}
.planr-task strong,
.planr-task small { display: block; }
.planr-task small { margin-top: 4px; color: var(--muted); }
.planr-task__badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
@media (max-width: 760px) {
  .page-history-controls { width: 100%; }
  .page-history-button { flex: 1; justify-content: center; }
  .dashboard-approval-card,
  .planr-day,
  .planr-task {
    grid-template-columns: 1fr;
  }
  .dashboard-approval-card__actions,
  .planr-task__badges {
    justify-content: flex-start;
  }
  .product-tabs { width: 100%; }
  .product-tab { flex: 1; justify-content: center; }
  .composer-shortcut-hint { width: 100%; }
}

/* Step 7 v0.1.5 final stabilization polish */
.task-card {
  touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.task-card input,
.task-card textarea,
.task-card select,
.task-card button,
.task-card a,
.task-card [data-no-drag] {
  -webkit-user-select: text;
     -moz-user-select: text;
          user-select: text;
}
.profile-security-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* v0.1.7 final Step 7 board setup refinements */
.board-column-config {
  display: grid;
  gap: 10px;
  width: 100%;
}

.board-column-config__row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1.3fr) minmax(150px, 1fr) auto auto auto;
}

@media (max-width: 820px) {
  .board-column-config__row {
    grid-template-columns: 1fr;
  }
}

/* Step 7 v0.1.8 final board/draft stabilization */
.dashboard-welcome-chat .persistent-chat {
  min-height: 500px;
}
.dashboard-welcome-chat .persistent-chat--compact {
  min-height: 430px;
}
.dashboard-welcome-chat .persistent-chat--compact .persistent-chat__history {
  max-height: 430px;
}
.assistant-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 22px 0;
}
.assistant-quick-prompts button {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--sync-blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.assistant-quick-prompts button:hover,
.assistant-quick-prompts button:focus-visible {
  border-color: rgba(22, 213, 198, .7);
  background: rgba(22, 213, 198, .12);
  outline: none;
}
.board-column-config__row {
  grid-template-columns: minmax(100px, .7fr) minmax(220px, 1.4fr) auto auto auto auto;
}
.board-column-config__stage,
.board-column-config__count {
  align-items: center;
  display: inline-flex;
  min-height: 42px;
}
.board-column-config__count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 920px) {
  .board-column-config__row {
    grid-template-columns: 1fr;
  }
}

/* Step 7 v0.1.9 dashboard/chat approval polish */
.dashboard-welcome-chat {
  justify-self: center;
  width: min(1100px, 100%);
}
.dashboard-welcome-chat .ui-card {
  overflow: hidden;
}
.dashboard-welcome-chat .persistent-chat,
.dashboard-welcome-chat .persistent-chat--compact {
  max-height: min(680px, calc(100dvh - 160px));
  min-height: min(560px, calc(100dvh - 160px));
}
.dashboard-welcome-chat .persistent-chat__conversation .assistant-messages {
  max-height: none;
  overflow-y: auto;
}
.dashboard-welcome-chat .assistant-composer textarea {
  max-height: 140px;
  overflow-y: auto;
}
.chat-approval-panel {
  display: grid;
  gap: 11px;
  max-width: min(100%, 860px);
  padding: 14px;
  border: 1px solid #dceafe;
  border-radius: 20px;
  background: #f8fbff;
}
.chat-approval-panel__header,
.chat-approval-card,
.chat-approval-card__actions {
  display: flex;
  gap: 10px;
}
.chat-approval-panel__header {
  align-items: center;
  justify-content: space-between;
}
.chat-approval-panel__header strong,
.chat-approval-panel__header small,
.chat-approval-card__copy strong,
.chat-approval-card__copy p {
  display: block;
}
.chat-approval-panel__header small,
.chat-approval-card__copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
}
.chat-approval-card {
  align-items: flex-start;
  justify-content: space-between;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fff;
}
.chat-approval-card__copy {
  min-width: 0;
}
.chat-approval-card__actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.board-column__actions .ui-button--sm {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 10px;
}
@media (max-width: 760px) {
  .dashboard-welcome-chat .persistent-chat,
  .dashboard-welcome-chat .persistent-chat--compact {
    max-height: none;
    min-height: 620px;
  }
  .chat-approval-card,
  .chat-approval-panel__header {
    align-items: stretch;
    flex-direction: column;
  }
  .chat-approval-card__actions {
    justify-content: flex-start;
  }
}


/* Step 7 v0.1.10 dashboard/chat UX polish */
:root { --mindsyncr-chat-font-size: 14px; }
html[data-mindsyncr-chat-font-size="small"] { --mindsyncr-chat-font-size: 13px; }
html[data-mindsyncr-chat-font-size="normal"] { --mindsyncr-chat-font-size: 14px; }
html[data-mindsyncr-chat-font-size="large"] { --mindsyncr-chat-font-size: 16px; }

.chat-message,
.chat-message p,
.assistant-messages,
.assistant-composer textarea,
.ai-task-chat,
.ai-task-chat textarea,
.ai-task-message,
.ai-task-message p,
.chat-approval-card__copy p {
  font-size: var(--mindsyncr-chat-font-size);
}

.chat-font-size-button {
  font-weight: 900;
  letter-spacing: -0.04em;
}

.persistent-chat__conversation {
  overflow: hidden;
}

.persistent-chat__conversation .assistant-messages {
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.persistent-chat__conversation .assistant-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 0;
  border-top: 1px solid var(--border);
  background: #fff;
}

.dashboard-welcome-chat {
  justify-self: stretch;
  width: 100%;
  max-width: none;
}

.dashboard-welcome-chat .ui-card {
  display: grid;
  gap: 16px;
  width: 100%;
}

.dashboard-welcome-chat .persistent-chat,
.dashboard-welcome-chat .persistent-chat--compact {
  width: 100%;
  min-height: 360px;
  height: min(60vh, 680px);
  max-height: min(60vh, 680px);
}

.dashboard-welcome-chat .persistent-chat__conversation {
  min-height: 0;
}

.dashboard-welcome-chat .persistent-chat__conversation .assistant-messages {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.dashboard-welcome-chat .assistant-composer {
  flex: 0 0 auto;
}

.ai-task-composer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.workspace-carousel {
  display: grid;
  grid-auto-columns: minmax(300px, calc((100% - 44px) / 3));
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.workspace-carousel .workspace-card-link {
  min-width: 0;
  scroll-snap-align: start;
}

.workspace-carousel .ui-card {
  height: 100%;
}

.workspace-carousel__controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workspace-carousel__controls .ui-button:first-child svg {
  transform: rotate(90deg);
}

.workspace-carousel__controls .ui-button:last-child svg {
  transform: rotate(-90deg);
}

@media (max-width: 760px) {
  .dashboard-welcome-chat .persistent-chat,
  .dashboard-welcome-chat .persistent-chat--compact {
    height: min(70vh, 640px);
    max-height: min(70vh, 640px);
  }
  .workspace-carousel {
    grid-auto-columns: minmax(260px, 84vw);
  }
  .ai-task-composer__actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Step 7 v0.1.11 chat layout consistency hotfix */
.workspace-chat-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.workspace-chat-card .persistent-chat {
  width: 100%;
  min-height: 360px;
  height: min(60vh, 680px);
  max-height: min(60vh, 680px);
}

.workspace-chat-card .persistent-chat__history,
.workspace-chat-card .persistent-chat__conversation {
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.workspace-chat-card .persistent-chat__history {
  overflow-y: auto;
}

.workspace-chat-card .persistent-chat__conversation .assistant-messages {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.workspace-chat-card .persistent-chat__conversation .assistant-composer {
  flex: 0 0 auto;
}

.task-detail-drawer--ai {
  display: flex;
  max-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}

.task-detail-drawer--ai .task-detail-header {
  flex: 0 0 auto;
}

.task-detail-drawer--ai .task-edit-ai-layout {
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100dvh - 145px);
  max-height: calc(100dvh - 145px);
}

.task-detail-drawer--ai .task-edit-ai-chat {
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.task-detail-drawer--ai .task-edit-ai-chat__messages {
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.task-detail-drawer--ai .task-edit-ai-composer {
  flex: 0 0 auto;
}

.task-detail-drawer--ai .task-edit-fields {
  min-height: 0;
  overflow-y: auto;
}

.ai-task-builder {
  max-height: min(760px, calc(100dvh - 84px));
}

.ai-task-builder .ai-task-chat,
.ai-task-builder .ai-task-review {
  min-height: 0;
}

.ai-task-builder .ai-task-chat__messages {
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

@media (max-width: 980px) {
  .task-detail-drawer--ai {
    overflow-y: auto;
  }
  .task-detail-drawer--ai .task-edit-ai-layout {
    height: auto;
    max-height: none;
  }
  .task-detail-drawer--ai .task-edit-ai-chat {
    height: min(70vh, 640px);
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .workspace-chat-card .persistent-chat {
    height: min(70vh, 640px);
    max-height: min(70vh, 640px);
  }
}

/* Step 7 v0.1.12 final Step 7 polish */
.app-footer {
  padding: 0 28px 28px;
  color: var(--muted);
  font-size: 12px;
}

.app-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(18, 98, 241, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 30px rgba(12, 31, 63, .04);
}

.app-footer__version {
  font-weight: 700;
  letter-spacing: .01em;
}

.app-footer__builder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.app-footer__builder:hover,
.app-footer__builder:focus-visible {
  color: var(--sync-blue);
}

.app-footer__builder img {
  width: 18px;
  height: 18px;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 5px;
}

.projects-search-card {
  display: grid;
  gap: 10px;
}

.projects-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
}

.projects-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  color: var(--ink);
  background: transparent;
}

.project-inline-chat-card {
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.project-inline-chat-card .persistent-chat {
  width: 100%;
  min-height: 420px;
  height: min(62vh, 720px);
  max-height: min(62vh, 720px);
}

.project-inline-chat-card .persistent-chat__history,
.project-inline-chat-card .persistent-chat__conversation {
  min-height: 0;
  overflow: hidden;
}

.project-inline-chat-card .persistent-chat__history {
  overflow-y: auto;
}

.project-inline-chat-card .assistant-messages {
  min-height: 0;
  overflow-y: auto;
}

.chat-search-results {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(18, 98, 241, .14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 98, 241, .06), rgba(22, 213, 198, .08));
}

.chat-search-results__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-search-results__head strong {
  display: block;
  color: var(--ink);
}

.chat-search-results__head small,
.chat-search-card small {
  color: var(--muted);
}

.chat-search-results__list {
  display: grid;
  gap: 8px;
}

.chat-search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(12, 31, 63, .05);
}

.chat-search-card:hover,
.chat-search-card:focus-visible {
  border-color: rgba(18, 98, 241, .36);
  transform: translateY(-1px);
}

.chat-search-card strong {
  display: block;
  color: var(--ink);
}

.chat-search-card__type {
  flex: 0 0 auto;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--sync-blue);
}

@media (max-width: 760px) {
  .app-footer {
    padding: 0 16px 92px;
  }
  .app-footer__inner {
    align-items: flex-start;
    border-radius: 22px;
    flex-direction: column;
  }
  .project-inline-chat-card .persistent-chat {
    height: min(70vh, 680px);
    max-height: min(70vh, 680px);
  }
}

/* Step 8 v0.1.0 local LLM / model management */
.chat-model-selector {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(18, 98, 241, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .76);
}

.chat-model-selector label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.chat-model-selector select {
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.chat-model-selector small {
  color: var(--muted);
  font-size: 12px;
}

.chat-model-selector__manage {
  color: var(--sync-blue);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.chat-model-selector__manage:hover,
.chat-model-selector__manage:focus-visible {
  text-decoration: underline;
}

.chat-model-selector--compact {
  padding: 6px 8px;
  gap: 6px;
}

.chat-model-selector--compact select {
  min-width: min(220px, 52vw);
  padding: 6px 10px;
}

.assistant-composer__model {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.ai-task-chat .chat-model-selector,
.task-edit-ai-chat .chat-model-selector,
.project-ai-chat .chat-model-selector {
  margin: 8px 0 10px;
}

@media (max-width: 760px) {
  .chat-model-selector,
  .chat-model-selector label {
    align-items: stretch;
    width: 100%;
  }

  .chat-model-selector label {
    flex-direction: column;
    gap: 4px;
  }

  .chat-model-selector select {
    width: 100%;
    min-width: 0;
  }
}


/* Step 8 v0.1.1 hotfix: carousel, calmer chat scroll, Task Butler model placement */
.dashboard-workspaces-section {
  min-width: 0;
  overflow: hidden;
}

.workspace-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.workspace-carousel .workspace-card-link {
  flex: 0 0 calc((100% - 44px) / 3);
  max-width: calc((100% - 44px) / 3);
  min-width: 280px;
}

.persistent-chat__conversation .assistant-messages {
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.ai-task-chat__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(18, 98, 241, .09);
  flex: 0 0 auto;
}

.ai-task-chat__topbar .chat-model-selector {
  flex: 0 0 auto;
  margin: 0;
}

.task-edit-ai-chat__topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

@media (max-width: 900px) {
  .workspace-carousel .workspace-card-link {
    flex-basis: min(420px, 84vw);
    max-width: min(420px, 84vw);
  }

  .ai-task-chat__topbar {
    flex-direction: column;
  }

  .ai-task-chat__topbar .chat-model-selector {
    width: 100%;
  }
}

.brain-search { flex-wrap: wrap; min-width: 0; width: 100%; }
.brain-search .ui-button { margin-left: auto; }
.brain-results { max-height: min(62vh, 680px); overflow: auto; padding-right: 4px; }

/* Step 8.1 document/security foundation */
.document-manager .section-heading { margin-bottom: 16px; }
.document-upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 18px; background: #fbfcff; }
.document-upload-row small { color: var(--muted); }
.document-recent-list { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.document-manager--compact .section-heading h2 { font-size: 20px; }
.list-card--stacked { align-items: stretch; flex-direction: column; }


/* Step 9.1 responsive UI + compact controls */
.header-user-pill__avatar img,
.profile-avatar-editor__preview img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; border-radius: inherit; }
.profile-avatar-editor { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; padding: 16px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 20px; background: #f8fbff; }
.profile-avatar-editor__preview { width: 104px; height: 104px; border-radius: 999px; display: grid; place-items: center; overflow: hidden; background: #fff; border: 1px solid var(--border); color: var(--muted); }
.profile-avatar-editor__controls { display: grid; gap: 12px; }
.profile-avatar-editor__sliders { display: grid; gap: 10px; }
.profile-avatar-editor__sliders label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.board-column__actions .ui-button--icon { width: 34px; height: 34px; padding: 0; }
.board-column--add-list { background: transparent; border-style: dashed; min-width: 220px; }
.board-add-list-card { width: 100%; min-height: 180px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 18px; border: 1px dashed var(--border); border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.68); cursor: pointer; }
.board-add-list-card strong { color: var(--text); }
.board-add-list-card:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.task-mobile-tabs { display: none; gap: 8px; margin: 0 0 12px; padding: 6px; border: 1px solid var(--border); border-radius: 16px; background: #f8fbff; }
.task-mobile-tabs__button { flex: 1; border: 0; border-radius: 12px; padding: 9px 10px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.task-mobile-tabs__button--active { background: #fff; color: var(--text); box-shadow: 0 6px 18px rgba(31,42,68,.08); }
.ai-task-chat__topbar,
.task-edit-ai-chat__topbar { gap: 10px; }
.ai-task-chat__topbar .model-selector,
.task-edit-ai-chat__topbar .model-selector { flex: 0 0 auto; }
@media (max-width: 1100px) {
  .content-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-grid { grid-auto-columns: minmax(280px, 76vw); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 12px; }
  .board-column { scroll-snap-align: start; }
}
@media (max-width: 900px) {
  .task-detail-drawer--ai { width: 100vw; padding: 14px; }
  .task-mobile-tabs { display: flex; position: sticky; top: 0; z-index: 2; }
  .task-detail-drawer--ai .task-edit-ai-layout { display: block; height: calc(100dvh - 190px); max-height: calc(100dvh - 190px); overflow: hidden; }
  .task-detail-drawer--ai .task-edit-ai-layout[data-mobile-panel="chat"] .task-edit-fields { display: none; }
  .task-detail-drawer--ai .task-edit-ai-layout[data-mobile-panel="draft"] .task-edit-ai-chat,
  .task-detail-drawer--ai .task-edit-ai-layout[data-mobile-panel="checklist"] .task-edit-ai-chat,
  .task-detail-drawer--ai .task-edit-ai-layout[data-mobile-panel="details"] .task-edit-ai-chat { display: none; }
  .task-detail-drawer--ai .task-edit-ai-layout[data-mobile-panel="draft"] .task-edit-fields,
  .task-detail-drawer--ai .task-edit-ai-layout[data-mobile-panel="checklist"] .task-edit-fields,
  .task-detail-drawer--ai .task-edit-ai-layout[data-mobile-panel="details"] .task-edit-fields { display: block; height: 100%; max-height: 100%; overflow-y: auto; }
  .task-detail-drawer--ai .task-edit-ai-chat { height: 100%; min-height: 0; }
  .task-detail-drawer--ai .task-edit-ai-chat__messages { max-height: none; }
  .task-detail-actions--sticky { position: sticky; bottom: 0; background: rgba(255,255,255,.96); padding-block: 10px; }
  .ai-task-builder { grid-template-columns: 1fr; max-height: calc(100dvh - 110px); overflow-y: auto; }
  .ai-task-chat, .ai-task-review { min-height: min(62dvh, 560px); }
}
@media (max-width: 680px) {
  .app-header { padding-inline: 14px; }
  .app-content { padding-inline: 14px; }
  .content-grid, .content-grid--2, .content-grid--4 { grid-template-columns: 1fr; }
  .profile-avatar-editor { grid-template-columns: 1fr; }
  .profile-avatar-editor__preview { margin: 0 auto; }
  .ai-task-chat__intro small, .task-edit-ai-chat__topbar small { display: none; }
  .board-toolbar { align-items: stretch; }
  .board-toolbar .board-search { flex-basis: 100%; }
}

/* Step 9.2 chat UI stabilization: slim headers, icon-first model selector, more room for messages */
.chat-model-selector--icon {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  flex: 0 0 auto;
}

.chat-model-selector__trigger,
.chat-overflow-menu summary {
  min-width: 38px;
  min-height: 38px;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(12, 31, 63, .05);
}

.chat-model-selector__trigger:hover,
.chat-model-selector__trigger:focus-visible,
.chat-overflow-menu summary:hover,
.chat-overflow-menu summary:focus-visible {
  border-color: rgba(18, 98, 241, .35);
  color: var(--mind-blue);
  outline: 2px solid rgba(22, 213, 198, .25);
}

.chat-model-selector__desktop-chip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.chat-model-selector__popover,
.chat-overflow-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: min(320px, 86vw);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-drawer);
}

.chat-model-selector__popover-head,
.chat-model-selector__popover-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-model-selector__popover-head strong,
.chat-model-selector__popover-head small {
  display: block;
}

.chat-model-selector__popover-head small {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.chat-model-selector__picker {
  display: grid !important;
  gap: 6px !important;
  margin-top: 12px;
  width: 100% !important;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-model-selector__picker select {
  width: 100% !important;
  min-width: 0 !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.chat-model-selector__popover-actions {
  margin-top: 10px;
}

.chat-model-selector__popover-actions button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.assistant-conversation__context--slim {
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  gap: 10px;
}

.assistant-conversation__title {
  min-width: 0;
  flex: 1 1 auto;
}

.assistant-conversation__title h2 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.assistant-conversation__title small {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.chat-toolbar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.chat-toolbar .ui-button--icon {
  width: 38px;
  height: 38px;
  padding: 0;
}

.chat-overflow-menu {
  position: relative;
}

.chat-overflow-menu summary {
  list-style: none;
}

.chat-overflow-menu summary::-webkit-details-marker {
  display: none;
}

.chat-overflow-menu__panel {
  display: grid;
  gap: 4px;
}

.chat-overflow-menu__panel button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.chat-overflow-menu__panel button:hover,
.chat-overflow-menu__panel button:focus-visible {
  background: #f4f8ff;
  outline: none;
}

.chat-overflow-menu__panel small {
  margin-top: 6px;
  padding: 8px 10px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.45;
}

.persistent-chat__conversation .assistant-messages {
  padding: 14px 18px;
}

.persistent-chat__conversation .assistant-composer {
  margin: 0 14px 14px;
  padding: 10px;
  border-radius: 16px;
}

.persistent-chat__conversation .assistant-composer textarea {
  min-height: 66px;
}

.project-ai-chat .chat-model-selector--icon,
.ai-task-chat__topbar .chat-model-selector--icon,
.task-edit-ai-chat__topbar .chat-model-selector--icon,
.assistant-composer__model .chat-model-selector--icon {
  width: auto !important;
}

.project-ai-chat {
  position: relative;
}

.project-ai-chat > .chat-model-selector--icon {
  justify-self: end;
}

.ai-task-chat__topbar {
  align-items: center;
  padding-bottom: 8px;
}

.ai-task-chat__intro {
  min-width: 0;
}

.ai-task-chat__intro strong,
.ai-task-chat__intro small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-error {
  color: #b42318 !important;
  font-weight: 800;
}

@media (max-width: 900px) {
  .ai-task-chat__topbar {
    flex-direction: row;
    align-items: center;
  }
  .ai-task-chat__topbar .chat-model-selector--icon {
    width: auto !important;
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .assistant-conversation__context--slim {
    flex-direction: row !important;
    align-items: center !important;
    padding: 8px 10px;
  }
  .assistant-conversation__title h2 {
    font-size: 16px;
  }
  .assistant-conversation__title small {
    display: none;
  }
  .chat-toolbar {
    gap: 4px;
  }
  .chat-toolbar .ui-button--icon,
  .chat-model-selector__trigger,
  .chat-overflow-menu summary {
    min-width: 34px;
    width: 34px;
    height: 34px;
  }
  .chat-model-selector__desktop-chip {
    display: none;
  }
  .chat-model-selector__popover,
  .chat-overflow-menu__panel {
    right: 0;
    width: min(300px, 92vw);
  }
  .persistent-chat__conversation .assistant-messages {
    padding: 12px;
  }
  .persistent-chat__conversation .assistant-composer {
    margin: 0 10px 10px;
  }
  .assistant-composer__actions {
    align-items: center;
  }
  .composer-shortcut-hint {
    max-width: 150px;
    line-height: 1.35;
  }
}

/* Step 9.3 AI project creation + chat behavior stabilization */
.section-heading--compact-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-ai-chat--drafting {
  grid-template-rows: minmax(230px, 1fr) auto auto;
}

.project-draft-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(18, 98, 241, .14);
  border-radius: 18px;
  background: #f8fbff;
}

.project-draft-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-draft-preview h3,
.project-draft-preview p,
.project-draft-preview ul {
  margin: 0;
}

.project-draft-preview ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.project-draft-preview summary {
  cursor: pointer;
  color: var(--sync-blue);
  font-size: 13px;
  font-weight: 900;
}

.project-ai-chat__composer textarea {
  min-height: 90px;
}

@media (max-width: 760px) {
  .section-heading--compact-row {
    align-items: center;
    gap: 8px;
  }
  .section-heading--compact-row > div {
    min-width: 0;
  }
  .section-heading--compact-row p:not(.eyebrow) {
    display: none;
  }
  .project-draft-preview__head {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Step 9.4 chat readability + guided project creation polish */
.chat-markdown {
  display: grid;
  gap: 8px;
}
.chat-markdown h3,
.chat-markdown h4,
.chat-markdown p,
.chat-markdown ul,
.chat-markdown ol,
.chat-markdown blockquote {
  margin: 0;
}
.chat-markdown h3 {
  color: var(--mind-navy);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.01em;
}
.chat-markdown h4 {
  color: var(--mind-navy);
  font-size: 12px;
  font-weight: 900;
}
.chat-markdown p {
  line-height: 1.6;
}
.chat-markdown ul,
.chat-markdown ol {
  display: grid;
  gap: 4px;
  padding-left: 18px;
}
.chat-markdown li {
  line-height: 1.55;
}
.chat-markdown blockquote {
  padding: 8px 10px;
  border-left: 3px solid rgba(18, 98, 241, .35);
  border-radius: 10px;
  background: rgba(18, 98, 241, .07);
  color: var(--muted);
}
.chat-message--user .chat-markdown h3,
.chat-message--user .chat-markdown h4,
.chat-message--user .chat-markdown p,
.chat-message--user .chat-markdown li,
.chat-message--user .chat-markdown blockquote {
  color: #fff;
}
.chat-message--user .chat-markdown blockquote {
  border-left-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.1);
}
.guided-question-stack {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.guided-question-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(18, 98, 241, .13);
  border-radius: 16px;
  background: #fff;
}
.guided-question-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.guided-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.guided-choice-list button,
.project-create-mode__button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--mind-navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.guided-choice-list button:hover,
.project-create-mode__button:hover,
.project-create-mode__button--active {
  border-color: rgba(18, 98, 241, .55);
  background: rgba(18, 98, 241, .08);
  color: var(--sync-blue);
}
.guided-choice-list button:disabled {
  cursor: wait;
  opacity: .58;
}
.project-create-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}
.project-ai-chat__messages .chat-message {
  max-width: 92%;
}
.project-draft-preview details[open] {
  display: grid;
  gap: 8px;
}
@media (max-width: 760px) {
  .guided-choice-list,
  .project-create-mode {
    align-items: stretch;
    flex-direction: column;
  }
  .guided-choice-list button,
  .project-create-mode__button {
    width: 100%;
    text-align: left;
  }
}
.ai-task-message .chat-markdown {
  margin-top: 4px;
}
.ai-task-message--user .chat-markdown h3,
.ai-task-message--user .chat-markdown h4,
.ai-task-message--user .chat-markdown p,
.ai-task-message--user .chat-markdown li,
.ai-task-message--user .chat-markdown blockquote {
  color: #fff;
}

/* Step 9.5 mobile UX, guided flow persistence, and email-template polish */
.page-transition-shell {
  display: grid;
  gap: 18px;
  animation: page-transition-fade 180ms ease-out;
}
.page-transition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.page-transition-card {
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #f3f7fb 0%, #ffffff 48%, #f3f7fb 100%);
  background-size: 220% 100%;
  box-shadow: var(--shadow-soft);
  animation: page-transition-shimmer 1.35s ease-in-out infinite;
}
.page-transition-card--hero { min-height: 280px; }
.page-transition-card--wide { min-height: 230px; }
@keyframes page-transition-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@keyframes page-transition-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.resume-draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid #bceee8;
  border-radius: 18px;
  background: #effcf9;
  color: #075d56;
  font-size: 13px;
  font-weight: 750;
}
.resume-draft-banner > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.guided-progress-note {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dceafe;
  border-radius: 14px;
  background: #f7fbff;
}
.guided-progress-note small {
  color: var(--muted);
  line-height: 1.45;
}
.project-draft-preview .guided-question-stack {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.project-inline-chat-card {
  order: -1;
}
.header-user-pill__avatar {
  overflow: hidden;
  justify-content: center;
  align-items: center;
}
.header-user-pill__avatar img,
.profile-avatar-editor__preview img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  transform-origin: center center;
}
@media (max-width: 980px) {
  .project-inline-chat-card { order: -2; }
}
@media (max-width: 760px) {
  .page-transition-grid { grid-template-columns: 1fr; }
  .page-transition-card--hero { min-height: 220px; }
  .resume-draft-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .resume-draft-banner > div {
    display: grid;
    grid-template-columns: 1fr;
  }
  .project-draft-preview {
    max-height: none;
  }
  .header-user-pill__avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }
}

/* Step 9.6 action execution and safe management cards */
.action-result-card,
.inline-status-note,
.delete-approval-card {
  border: 1px solid rgba(47, 115, 255, 0.16);
  border-radius: 18px;
  background: rgba(47, 115, 255, 0.06);
  padding: 14px;
}

.action-result-card p,
.delete-approval-card p,
.inline-status-note {
  color: var(--muted);
  line-height: 1.55;
}

.management-card {
  border-color: rgba(242, 34, 168, 0.18);
}

.management-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.delete-approval-card {
  margin-top: 14px;
  background: rgba(255, 184, 0, 0.08);
  border-color: rgba(255, 184, 0, 0.26);
}

.delete-approval-card ul {
  margin: 10px 0 14px;
  padding-left: 20px;
  color: var(--muted);
}

.project-create-mode__button--primary {
  border-color: rgba(242, 34, 168, 0.42);
  background: rgba(242, 34, 168, 0.1);
  color: var(--accent-strong, #a81273);
  font-weight: 700;
}

@media (max-width: 780px) {
  .management-grid {
    grid-template-columns: 1fr;
  }

  .delete-approval-card,
  .action-result-card {
    padding: 12px;
  }
}

/* Step 9.7 AI defaults, guided planning hardening, focus controls */
.focus-collapsible__head,
.focus-collapsible__bar,
.profile-shortcut-grid,
.profile-shortcut-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.focus-collapsible__head,
.focus-collapsible__bar {
  justify-content: space-between;
}
.focus-collapsible__head .page-header {
  margin: 0;
  flex: 1 1 auto;
}
.focus-collapsible__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.focus-collapsible--collapsed {
  gap: 8px;
}
.focus-collapsible__bar {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid rgba(18, 98, 241, .13);
  border-radius: 16px;
  background: rgba(18, 98, 241, .05);
}
.focus-collapsible__bar span {
  display: grid;
  gap: 3px;
}
.focus-collapsible__bar small {
  color: var(--muted);
  font-size: 12px;
}
.dashboard-welcome-chat .persistent-chat,
.workspace-chat-card .persistent-chat {
  min-height: min(72vh, 780px);
}
.profile-shortcut-grid {
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.profile-shortcut-card {
  flex: 1 1 180px;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--mind-navy);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}
.profile-shortcut-card span {
  display: grid;
  gap: 3px;
}
.profile-shortcut-card small {
  color: var(--muted);
  font-size: 12px;
}
.profile-shortcut-card:hover {
  border-color: rgba(18, 98, 241, .32);
  transform: translateY(-1px);
}
@media (max-width: 760px) {
  .focus-collapsible__head,
  .focus-collapsible__bar {
    align-items: stretch;
    flex-direction: column;
  }
  .focus-collapsible__actions,
  .profile-shortcut-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .focus-collapsible__actions .ui-button,
  .focus-collapsible__actions button,
  .profile-shortcut-card {
    width: 100%;
  }
}

/* Step 9.8 guided chat enforcement and layout polish */
.hero-panel--collapsed {
  min-height: 0;
  padding: 10px 12px;
  justify-content: center;
}
.hero-panel--collapsed .focus-collapsible__bar {
  border: 0;
  background: transparent;
  padding: 0;
}
.focus-collapsible__bar--slim {
  min-height: 44px;
}
.project-create-layout {
  align-items: start;
}
.project-create-layout > .ui-card:first-child {
  position: sticky;
  top: 88px;
}
.project-create-layout .project-ai-chat {
  min-height: min(74vh, 820px);
}
.project-create-layout .project-ai-chat__messages {
  min-height: 260px;
}
.management-card {
  scroll-margin-top: 90px;
}
@media (max-width: 980px) {
  .project-create-layout > .ui-card:first-child {
    position: static;
  }
}
@media (max-width: 760px) {
  .hero-panel--collapsed {
    padding: 8px 10px;
  }
  .focus-collapsible__bar--slim small {
    display: none;
  }
  .project-create-layout .project-ai-chat {
    min-height: 68vh;
  }
}

/* Step 9.9 multi-provider AI settings, mobile chat usability, and guided flow stabilization */
.ai-provider-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}
.ai-provider-table__row {
  display: grid;
  grid-template-columns: 86px 160px 150px minmax(220px, 1fr) 150px 120px 180px;
  gap: 8px;
  align-items: center;
  min-width: 1050px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.ai-provider-table__row--head {
  background: #f8fbff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ai-provider-table input,
.ai-provider-table select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}
.ai-provider-table small,
.toggle-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.toggle-cell { display: flex; align-items: center; gap: 7px; }
.toggle-cell input { width: auto; min-height: auto; }
.form-control--compact { gap: 3px; }
.ai-provider-table__actions { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 860px) {
  .dashboard-welcome-chat .persistent-chat,
  .workspace-chat-card .persistent-chat,
  .project-inline-chat-card .persistent-chat,
  .project-create-layout .project-ai-chat {
    min-height: calc(100dvh - 155px) !important;
    height: calc(100dvh - 155px) !important;
    border-radius: 22px;
  }
  .dashboard-welcome-chat .persistent-chat__history,
  .workspace-chat-card .persistent-chat__history,
  .project-inline-chat-card .persistent-chat__history {
    max-height: none !important;
    min-height: auto !important;
    border-bottom: 1px solid var(--border);
  }
  .dashboard-welcome-chat .persistent-chat__history .assistant-search,
  .workspace-chat-card .persistent-chat__history .assistant-search,
  .project-inline-chat-card .persistent-chat__history .assistant-search,
  .dashboard-welcome-chat .persistent-chat__thread-list,
  .workspace-chat-card .persistent-chat__thread-list,
  .project-inline-chat-card .persistent-chat__thread-list {
    display: none;
  }
  .dashboard-welcome-chat .persistent-chat__history-head,
  .workspace-chat-card .persistent-chat__history-head,
  .project-inline-chat-card .persistent-chat__history-head {
    padding: 10px 12px;
  }
  .dashboard-welcome-chat .persistent-chat__conversation,
  .workspace-chat-card .persistent-chat__conversation,
  .project-inline-chat-card .persistent-chat__conversation {
    min-height: 0 !important;
    flex: 1 1 auto;
  }
  .dashboard-welcome-chat .persistent-chat__conversation .assistant-conversation__context,
  .workspace-chat-card .persistent-chat__conversation .assistant-conversation__context,
  .project-inline-chat-card .persistent-chat__conversation .assistant-conversation__context {
    padding: 8px 10px;
  }
  .dashboard-welcome-chat .persistent-chat__conversation .assistant-conversation__context .eyebrow,
  .workspace-chat-card .persistent-chat__conversation .assistant-conversation__context .eyebrow,
  .project-inline-chat-card .persistent-chat__conversation .assistant-conversation__context .eyebrow,
  .dashboard-welcome-chat .persistent-chat__conversation .assistant-conversation__context p,
  .workspace-chat-card .persistent-chat__conversation .assistant-conversation__context p,
  .project-inline-chat-card .persistent-chat__conversation .assistant-conversation__context p {
    display: none;
  }
  .dashboard-welcome-chat .assistant-messages,
  .workspace-chat-card .assistant-messages,
  .project-inline-chat-card .assistant-messages,
  .project-create-layout .project-ai-chat__messages {
    min-height: 0 !important;
    flex: 1 1 auto;
    max-height: none !important;
    overflow-y: auto;
  }
  .dashboard-welcome-chat .quick-prompt-list,
  .workspace-chat-card .quick-prompt-list,
  .project-inline-chat-card .quick-prompt-list {
    display: none;
  }
  .assistant-composer,
  .project-ai-chat__composer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: #fff;
  }
  .project-create-layout .project-ai-chat {
    display: flex;
    flex-direction: column;
  }
  .project-create-layout .project-ai-chat__messages {
    order: 1;
  }
  .project-create-layout .project-draft-preview {
    max-height: 42dvh;
    overflow-y: auto;
  }
}

.guided-progress-note strong::before {
  content: "Progress · ";
  color: var(--sync-blue);
}


/* Step 9.11 — positive thinking state */
.chat-message--thinking {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.chat-message--thinking strong {
  margin-right: 2px;
}
.chat-thinking-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--sync-blue);
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  margin-top: 2px;
  animation: mindsyncr-spin 0.85s linear infinite;
}
@keyframes mindsyncr-spin {
  to { transform: rotate(360deg); }
}


/* Step 9.12 — clickable suggestions and compact workspace collapse */
.chat-suggested-replies,
.chat-result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chat-suggested-replies button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.chat-suggested-replies button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--sync-blue);
}
.chat-suggested-replies button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.workspace-header-card--collapsed {
  padding: 10px 12px !important;
}
.workspace-collapsed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}
.workspace-collapsed-header > strong {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.workspace-collapsed-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 720px) {
  .workspace-header-card--collapsed {
    padding: 8px 10px !important;
  }
  .workspace-collapsed-header {
    min-height: 34px;
  }
}

.chat-action-status {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(18, 98, 241, 0.18);
  border-radius: 999px;
  background: rgba(18, 98, 241, 0.07);
  color: var(--sync-blue);
  font-size: 11px;
  font-weight: 800;
}


/* Step 9.13.3: show active model/provider on the AI button without opening the selector. */
.chat-model-selector__trigger {
  padding: 0 12px;
  max-width: min(300px, 46vw);
}

@media (max-width: 760px) {
  .chat-model-selector__desktop-chip {
    max-width: 142px;
  }
}

/* Step 9.13.4 dashboard/workspace simplification and global context header */
.app-header > .brand-logo-link {
  flex: 0 1 280px;
}
.app-header__context {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  justify-items: start;
  gap: 2px;
  padding: 8px 12px;
  border-left: 1px solid var(--border);
}
.app-header__context small {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.app-header__context strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--mind-navy);
  font-size: clamp(15px, 1.8vw, 21px);
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-header__history {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}
.app-header__history-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.app-header__history-button:hover,
.app-header__history-button:focus-visible {
  border-color: rgba(22, 213, 198, .65);
  background: rgba(22, 213, 198, .1);
  color: var(--mind-navy);
  outline: none;
}
.app-header__history-button:active { transform: scale(.98); }
.dashboard-stack--simplified {
  gap: 18px;
}
.dashboard-focus-strip,
.workspace-summary-card {
  border-color: rgba(18, 98, 241, .14);
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}
.continue-grid,
.workspace-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.continue-card,
.summary-pill,
.workspace-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--mind-navy);
  box-shadow: 0 10px 26px rgba(16, 29, 53, .04);
}
.continue-card strong,
.continue-card small,
.summary-pill strong,
.summary-pill small,
.workspace-chip strong,
.workspace-chip small,
.management-accordion-trigger strong,
.management-accordion-trigger small {
  display: block;
}
.continue-card small,
.summary-pill small,
.workspace-chip small,
.management-accordion-trigger small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.continue-card--button,
.workspace-chip--button,
.management-accordion-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.continue-card--button,
.workspace-chip--button {
  border: 1px dashed rgba(18, 98, 241, .28);
}
.continue-card--muted {
  background: #fbfcff;
}
.continue-card:hover,
.continue-card:focus-visible,
.workspace-chip:hover,
.workspace-chip:focus-visible,
.summary-pill--link:hover,
.summary-pill--link:focus-visible {
  border-color: rgba(22, 213, 198, .58);
  outline: none;
}
.dashboard-workspaces-section--compact {
  display: grid;
  gap: 12px;
}
.workspace-compact-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.workspace-chip {
  flex: 0 0 min(340px, 86vw);
  scroll-snap-align: start;
}
.quick-setup-card {
  display: grid;
  gap: 14px;
}
.quick-setup-card__body {
  padding-top: 2px;
}
.workspace-page-simplified .workspace-chat-card .persistent-chat {
  min-height: min(72vh, 780px);
}
.summary-pill {
  justify-content: flex-start;
}
.summary-pill strong {
  font-size: 22px;
}
.workspace-management-card {
  padding: 0;
  overflow: hidden;
}
.management-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  background: #fff;
}
.management-accordion-trigger:hover,
.management-accordion-trigger:focus-visible {
  background: #fbfcff;
  outline: none;
}
.management-accordion-trigger__state {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.management-accordion-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}
@media (max-width: 1160px) {
  .continue-grid,
  .workspace-summary-metrics {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 980px) {
  .app-header__history-button span {
    display: none;
  }
  .app-header__history-button {
    width: 36px;
    justify-content: center;
    padding: 6px;
  }
}
@media (max-width: 760px) {
  .app-header {
    height: auto;
    min-height: var(--header-height);
    gap: 8px;
  }
  .app-header > .brand-logo-link {
    flex-basis: 124px;
    min-width: 92px;
  }
  .app-header__context {
    padding: 6px 8px;
    border-left: 0;
  }
  .app-header__context small {
    display: none;
  }
  .app-header__context strong {
    font-size: 14px;
  }
  .app-header__history {
    display: none;
  }
  .workspace-chip {
    flex-basis: min(300px, 88vw);
  }
  .continue-card,
  .summary-pill,
  .workspace-chip,
  .management-accordion-trigger {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Step 9.13.5 project page simplification */
.project-page-simplified { gap: 18px; }
.project-focus-card { padding: 18px 20px; }
.project-focus-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}
.project-focus-strip__main { min-width: 0; }
.project-focus-strip__main h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.045em;
}
.project-focus-strip__main p {
  margin: 0;
  max-width: 880px;
  color: var(--muted);
  line-height: 1.6;
}
.project-focus-next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #334155;
  font-size: 14px;
}
.project-focus-next strong { color: var(--sync-blue); }
.project-focus-strip__actions {
  display: flex;
  max-width: 360px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.project-work-card { display: grid; gap: 16px; }
.project-work-tabs {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 29, 53, .05);
}
.project-work-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}
.project-work-tab:focus-visible {
  outline: 3px solid rgba(18, 98, 241, .18);
  outline-offset: 2px;
}
.project-work-tab--active {
  background: linear-gradient(135deg, var(--sync-blue), var(--flow-cyan));
  color: #fff;
}
.project-work-panel { display: grid; gap: 16px; }
.project-board-embedded { gap: 14px; }
.project-board-embedded .board-grid { min-height: 460px; }
.project-board-embedded .board-column { min-height: 420px; }
.summary-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #f8fbff;
}
.summary-preview-card h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.035em; }
.summary-preview-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.project-management-tab {
  padding: 0;
  border: 0;
  box-shadow: none;
}
.project-summary-modal { width: min(920px, calc(100vw - 34px)); }
.project-summary-markdown {
  max-height: min(58vh, 620px);
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f7f9fd;
  color: #334155;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}
@media (max-width: 900px) {
  .project-focus-strip,
  .summary-preview-card { grid-template-columns: 1fr; }
  .project-focus-strip__actions { max-width: none; justify-content: flex-start; }
  .project-work-tabs { width: 100%; border-radius: 22px; }
  .project-work-tab { flex: 1 1 120px; }
}

/* Step 9.13.6: compact AI button with connection status dot. */
.chat-model-selector--icon .chat-model-selector__trigger {
  position: relative;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  max-width: 38px;
  gap: 0;
}

.chat-model-selector--icon .chat-model-selector__desktop-chip {
  display: none !important;
}

.chat-model-selector__status-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 1px rgba(12, 31, 63, .08);
}

.chat-model-selector__status-dot--connected {
  background: #16a34a;
}

.chat-model-selector__status-dot--checking {
  background: #f59e0b;
}

.chat-model-selector__status-dot--disconnected {
  background: #dc2626;
}

.chat-model-selector__status-dot--unknown {
  background: #9ca3af;
}

@media (max-width: 760px) {
  .chat-model-selector--icon .chat-model-selector__trigger {
    width: 34px;
    min-width: 34px;
    height: 34px;
    max-width: 34px;
  }
}


/* Step 9.13.8: make the project focus area a compact context strip now that
   the active project name lives in the global header. */
.project-focus-card--compact { padding: 12px 16px; }
.project-focus-card--compact .project-focus-strip {
  align-items: center;
  gap: 12px;
}
.project-focus-card--compact .eyebrow { margin-bottom: 6px; }
.project-focus-card--compact .project-focus-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}
.project-focus-card--compact .project-focus-line strong {
  color: var(--sync-blue);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.project-focus-card--compact .project-focus-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-focus-card--compact .project-focus-next { margin-top: 5px; }
.project-focus-card--compact .project-focus-strip__actions {
  align-items: center;
}
@media (max-width: 900px) {
  .project-focus-card--compact .project-focus-line {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Step 9.13.10: project-page ordering hotfix. Older chat-first rules moved
   .project-inline-chat-card above the focus strip. Scope the override to the
   simplified project page so other pages keep their existing layout. */
.project-page-simplified > .project-focus-card { order: 0; }
.project-page-simplified > .project-inline-chat-card { order: 1; }
.project-page-simplified > .project-work-card { order: 2; }

@media (max-width: 980px) {
  .project-page-simplified > .project-focus-card { order: 0; }
  .project-page-simplified > .project-inline-chat-card { order: 1; }
  .project-page-simplified > .project-work-card { order: 2; }
}


/* Step 9.14 Agent Registry Foundation */
.agents-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.agents-overview-grid .ui-card { padding: 18px; }
.agent-list-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--mind-navy);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.agent-list-card:hover,
.agent-list-card:focus-visible,
.agent-list-card--active {
  border-color: #bdd6ff;
  box-shadow: 0 12px 28px rgba(18, 98, 241, 0.08);
  outline: none;
}
.agent-list-card:active { transform: scale(.99); }
.agent-list-card strong,
.agent-list-card small { display: block; }
.agent-list-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}
.agent-avatar {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8e9ff;
  border-radius: 999px;
  background: #f5f9ff;
  color: var(--sync-blue);
}
.agent-avatar img {
  width: 34px;
  height: 34px;
  -o-object-fit: contain;
     object-fit: contain;
}
.agent-avatar--large {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}
.agent-detail-header,
.agent-review-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.agent-detail-header h2,
.agent-review-card h3 {
  margin: 0;
  letter-spacing: -.035em;
}
.agent-detail-header p:not(.eyebrow),
.agent-review-card p { margin: 4px 0 0; color: var(--muted); }
.agent-policy-group {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcff;
}
.agent-policy-group h3 { margin: 0 0 2px; font-size: 15px; }
.agent-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--mind-navy);
  font-size: 13px;
}
.agent-check input { margin-top: 3px; }
.agent-check strong,
.agent-check small { display: block; }
.agent-check small { color: var(--muted); line-height: 1.35; }
.agent-wizard-modal { width: min(920px, calc(100vw - 32px)); }
.agent-wizard-actions { justify-content: flex-end; }
.agent-review-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fbfcff;
}
.agent-review-card small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.45; }
@media (max-width: 980px) {
  .agents-layout { grid-template-columns: 1fr; }
  .agent-wizard-modal { width: calc(100vw - 18px); }
}

/* Step 9.14.1 — workspace chat scroll/layout stabilization */
.workspace-chat-card {
  overflow: clip;
  scroll-margin-top: 92px;
}
.workspace-chat-card .persistent-chat {
  height: clamp(640px, 72vh, 780px);
  max-height: clamp(640px, 72vh, 780px);
  min-height: 640px;
  contain: layout paint;
}
.workspace-chat-card .persistent-chat__conversation {
  display: flex;
  min-height: 0;
  overflow: hidden;
}
.workspace-chat-card .persistent-chat__conversation .assistant-messages {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  overflow-anchor: auto;
}
.workspace-chat-card .assistant-composer {
  flex: 0 0 auto;
  margin-top: auto;
  overflow-anchor: none;
}
.workspace-chat-card .assistant-composer textarea {
  height: 82px;
  min-height: 82px;
  max-height: 82px;
  overflow-y: auto;
}
.workspace-chat-card .chat-message {
  overflow-anchor: none;
}
.workspace-chat-card .chat-suggested-replies,
.workspace-chat-card .chat-result-links {
  min-height: 38px;
}
@media (max-width: 860px) {
  .workspace-chat-card .persistent-chat {
    min-height: calc(100dvh - 155px) !important;
    height: calc(100dvh - 155px) !important;
    max-height: calc(100dvh - 155px) !important;
  }
}

/* Step 9.14.2 — global release identity */
.auth-page {
  grid-template-rows: 1fr auto;
  align-content: center;
  row-gap: 20px;
}

.release-footer--auth {
  width: min(590px, 100%);
  color: var(--muted);
  font-size: 11px;
}

.release-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  text-align: center;
}

.release-footer__version {
  font-weight: 700;
  letter-spacing: .01em;
}

.release-footer__builder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.release-footer__builder:hover,
.release-footer__builder:focus-visible {
  color: var(--sync-blue);
}

.release-footer__builder img {
  width: 16px;
  height: 16px;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 4px;
}

@media (max-width: 760px) {
  .release-footer__inner {
    flex-direction: column;
    gap: 5px;
  }
}


/* Step 9.15 — conversation agent participants */
.chat-participant-menu { position: relative; }
.chat-participant-menu > summary { align-items:center; border:1px solid var(--border); border-radius:10px; cursor:pointer; display:flex; gap:6px; list-style:none; min-height:34px; padding:0 9px; font-size:12px; }
.chat-participant-menu > summary::-webkit-details-marker { display:none; }
.chat-participant-menu__panel { background:var(--surface); border:1px solid var(--border); border-radius:12px; box-shadow:0 14px 36px rgba(15,23,42,.14); display:grid; gap:8px; min-width:310px; padding:12px; position:absolute; right:0; top:calc(100% + 6px); z-index:30; }
.chat-participant-menu__panel select { border:1px solid var(--border); border-radius:8px; min-height:36px; padding:0 8px; width:100%; }
.chat-participant-row { align-items:center; display:grid; gap:6px; grid-template-columns:minmax(0,1fr) auto auto; }
.chat-participant-row button { border:1px solid var(--border); border-radius:8px; background:var(--surface); cursor:pointer; font-size:11px; min-height:30px; padding:4px 7px; }
.chat-participant-row__name { overflow:hidden; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
.chat-participant-row__name--selected { font-weight:700; outline:2px solid rgba(37,99,235,.22); }
.chat-participant-mindsyncr { border:0; background:transparent; cursor:pointer; font-size:11px; text-align:left; text-decoration:underline; }
@media (max-width: 720px) { .chat-participant-menu__panel { max-width:calc(100vw - 32px); min-width:280px; right:-64px; } .chat-participant-menu > summary span { display:none; } }

.chat-message-author { align-items:center; display:flex; gap:7px; }
.chat-message-author__avatar { align-items:center; background:rgba(37,99,235,.08); border-radius:999px; display:inline-flex; height:24px; justify-content:center; overflow:hidden; width:24px; }
.chat-message-author__avatar img { height:100%; -o-object-fit:cover; object-fit:cover; width:100%; }

/* Step 9.16 — agent task assignment */
.agent-task-proposal-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.agent-task-proposal-box textarea {
  min-height: 92px;
}

/* Step 9.18 — agent artifacts */
.agent-artifacts-panel { display: grid; gap: 16px; }
.artifact-create-grid { align-items: stretch; }
.artifact-create-card { display: grid; gap: 12px; align-content: start; }
.artifact-file-button { position: relative; overflow: hidden; width: -moz-max-content; width: max-content; cursor: pointer; }
.artifact-file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.artifact-list .list-card { align-items: center; }
@media (max-width: 760px) {
  .artifact-create-grid { grid-template-columns: 1fr; }
  .artifact-list .list-card { align-items: stretch; }
}


/* Step 9.18.1 chat awareness + export */
.chat-awareness{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;padding:.45rem .7rem;margin:.35rem .6rem 0;border:1px solid var(--border,#e5e7eb);border-radius:10px;background:var(--card,#fff);font-size:.78rem;color:var(--muted-foreground,#6b7280)}
.chat-awareness a{font-weight:700;color:inherit;text-decoration:none}.chat-awareness a:hover{text-decoration:underline}
.chat-export-menu{position:relative}.chat-export-menu>summary{cursor:pointer;list-style:none;padding:.42rem .6rem;border-radius:8px;font-size:.78rem}.chat-export-menu__panel{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:170px;background:white;border:1px solid #e5e7eb;border-radius:10px;padding:6px;box-shadow:0 12px 28px rgba(31,41,55,.12)}
.chat-export-menu__panel button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:.55rem .65rem;border-radius:7px;cursor:pointer}.chat-export-menu__panel button:hover{background:#f8fafc}

/* Step 9.18.2 — instance feature governance + roles */
.settings-tabs { display:flex; flex-wrap:wrap; gap:10px; }
.governance-list { display:grid; gap:0; }
.governance-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; padding:16px 0; border-bottom:1px solid var(--border, #e5e7eb); }
.governance-row:last-child { border-bottom:0; }
.governance-row p { margin:6px 0; color:var(--muted, #6b7280); }
.governance-row small { display:block; color:var(--muted, #6b7280); overflow-wrap:anywhere; }
.governance-row__title { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.governance-row__actions { display:flex; gap:12px; align-items:center; justify-content:flex-end; }
.governance-access { font-size:12px; color:var(--muted, #6b7280); text-transform:capitalize; }
.role-matrix-wrap { overflow:auto; }
.role-matrix { width:100%; border-collapse:collapse; min-width:760px; }
.role-matrix th,.role-matrix td { padding:11px 12px; border-bottom:1px solid var(--border, #e5e7eb); text-align:left; vertical-align:middle; }
.role-matrix th { font-size:12px; color:var(--muted, #6b7280); }
.role-matrix td:first-child { min-width:230px; }
.role-matrix td small { display:block; color:var(--muted, #6b7280); margin-top:3px; }
.role-matrix select { min-width:105px; }
@media (max-width: 720px) { .governance-row { grid-template-columns:1fr; } .governance-row__actions { justify-content:flex-start; } }

.invite-link-row{display:flex;gap:.75rem;align-items:center;margin-top:.75rem}.invite-link-row input{flex:1;min-width:0}
@media(max-width:720px){.invite-link-row{align-items:stretch;flex-direction:column}}
\n\n/* Step 9.22 — reusable Markdown Workspace / Task Thoughts */\n.markdown-workspace { position: relative; }\n.markdown-workspace__body { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }\n.markdown-workspace__body:has(.markdown-workspace__organizer) { grid-template-columns:minmax(0,1.5fr) minmax(300px,.8fr); }\n.markdown-workspace__main,.markdown-workspace__organizer,.markdown-workspace__proposal { border:1px solid var(--border-color,#e5e7eb); border-radius:12px; background:var(--surface,#fff); overflow:hidden; }\n.markdown-workspace__toolbar { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 12px; border-bottom:1px solid var(--border-color,#e5e7eb); }\n.markdown-workspace__toolbar small { display:block; margin-top:2px; color:var(--muted-text,#6b7280); }\n.markdown-workspace__actions,.markdown-workspace__quick-actions { display:flex; flex-wrap:wrap; gap:8px; }\n.markdown-workspace__editor { width:100%; min-height:360px; resize:vertical; border:0; outline:0; padding:16px; font:14px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; background:transparent; color:inherit; }\n.markdown-workspace__preview { min-height:360px; padding:16px; overflow:auto; }\n.markdown-workspace__organizer { padding:14px; display:flex; flex-direction:column; gap:12px; }\n.markdown-workspace__organizer textarea { width:100%; min-height:105px; resize:vertical; }\n.markdown-workspace__proposal-preview { max-height:340px; overflow:auto; padding:14px; }\n.markdown-workspace--fullscreen { position:fixed; inset:0; z-index:1200; background:var(--page-bg,#f8fafc); padding:18px; overflow:auto; }\n.markdown-workspace--fullscreen .markdown-workspace__editor,.markdown-workspace--fullscreen .markdown-workspace__preview { min-height:calc(100vh - 190px); }\n@media (max-width: 900px) { .markdown-workspace__body:has(.markdown-workspace__organizer) { grid-template-columns:1fr; } .markdown-workspace__toolbar { align-items:flex-start; flex-direction:column; } }\n

/* Build 9160 instance identity */
.instance-name { display:block; max-width:18rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted, #6B7280); font-size:.78rem; font-weight:700; }
.auth-instance-name { margin:.35rem auto 0; text-align:center; }
.app-header__brand { display:flex; align-items:center; gap:.6rem; min-width:0; }
.app-header__instance-name { max-width:12rem; }
@media (max-width: 760px) { .app-header__instance-name { max-width:7rem; font-size:.7rem; } }

/*!*********************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./node_modules/react-phone-number-input/style.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************/
/* CSS variables. */
:root {
	--PhoneInput-color--focus: #03b2cb;
	--PhoneInputInternationalIconPhone-opacity: 0.8;
	--PhoneInputInternationalIconGlobe-opacity: 0.65;
	--PhoneInputCountrySelect-marginRight: 0.35em;
	--PhoneInputCountrySelectArrow-width: 0.3em;
	--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);
	--PhoneInputCountrySelectArrow-borderWidth: 1px;
	--PhoneInputCountrySelectArrow-opacity: 0.45;
	--PhoneInputCountrySelectArrow-color: currentColor;
	--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);
	--PhoneInputCountrySelectArrow-transform: rotate(45deg);
	--PhoneInputCountryFlag-aspectRatio: 1.5;
	--PhoneInputCountryFlag-height: 1em;
	--PhoneInputCountryFlag-borderWidth: 1px;
	--PhoneInputCountryFlag-borderColor: rgba(0,0,0,0.5);
	--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);
	--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,0.1);
}

.PhoneInput {
	/* This is done to stretch the contents of this component. */
	display: flex;
	align-items: center;
}

.PhoneInputInput {
	/* The phone number input stretches to fill all empty space */
	flex: 1;
	/* The phone number input should shrink
	   to make room for the extension input */
	min-width: 0;
}

.PhoneInputCountryIcon {
	width: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));
	height: var(--PhoneInputCountryFlag-height);
}

.PhoneInputCountryIcon--square {
	width: var(--PhoneInputCountryFlag-height);
}

.PhoneInputCountryIcon--border {
	/* Removed `background-color` because when an `<img/>` was still loading
	   it would show a dark gray rectangle. */
	/* For some reason the `<img/>` is not stretched to 100% width and height
	   and sometime there can be seen white pixels of the background at top and bottom. */
	background-color: var(--PhoneInputCountryFlag-backgroundColor--loading);
	/* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */
	/* For some reason the `<img/>` is not stretched to 100% width and height
	   and sometime there can be seen white pixels of the background at top and bottom,
	   so an additional "inset" border is added. */
	box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),
		inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);
}

.PhoneInputCountryIconImg {
	/* Fixes weird vertical space above the flag icon. */
	/* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */
	display: block;
	/* 3rd party <SVG/> flag icons won't stretch if they have `width` and `height`.
	   Also, if an <SVG/> icon's aspect ratio was different, it wouldn't fit too. */
	width: 100%;
	height: 100%;
}

.PhoneInputInternationalIconPhone {
	opacity: var(--PhoneInputInternationalIconPhone-opacity);
}

.PhoneInputInternationalIconGlobe {
	opacity: var(--PhoneInputInternationalIconGlobe-opacity);
}

/* Styling native country `<select/>`. */

.PhoneInputCountry {
	position: relative;
	align-self: stretch;
	display: flex;
	align-items: center;
	margin-right: var(--PhoneInputCountrySelect-marginRight);
}

.PhoneInputCountrySelect {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	z-index: 1;
	border: 0;
	opacity: 0;
	cursor: pointer;
}

.PhoneInputCountrySelect[disabled],
.PhoneInputCountrySelect[readonly] {
	cursor: default;
}

.PhoneInputCountrySelectArrow {
	display: block;
	content: '';
	width: var(--PhoneInputCountrySelectArrow-width);
	height: var(--PhoneInputCountrySelectArrow-width);
	margin-left: var(--PhoneInputCountrySelectArrow-marginLeft);
	border-style: solid;
	border-color: var(--PhoneInputCountrySelectArrow-color);
	border-top-width: 0;
	border-bottom-width: var(--PhoneInputCountrySelectArrow-borderWidth);
	border-left-width: 0;
	border-right-width: var(--PhoneInputCountrySelectArrow-borderWidth);
	transform: var(--PhoneInputCountrySelectArrow-transform);
	opacity: var(--PhoneInputCountrySelectArrow-opacity);
}

.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon + .PhoneInputCountrySelectArrow {
	opacity: 1;
	color: var(--PhoneInputCountrySelectArrow-color--focus);
}

.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon--border {
	box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus),
		inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus);
}

.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon .PhoneInputInternationalIconGlobe {
	opacity: 1;
	color: var(--PhoneInputCountrySelectArrow-color--focus);
}
