/* Targeted evolution of the existing homepage. Brand, artwork and app tokens stay shared. */
[hidden] {
  display: none !important;
}
.calendar-copy .home-kicker,
.organization-copy .home-kicker,
.home-heading.matrix-heading .home-kicker {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 18px;
  padding: 0;
}
.home-bridge {
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(24px, 6vw, 80px);
}
.home-section.organization-section {
  padding-top: 96px;
  padding-bottom: 48px;
}
.organization-section .organization-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}
.organization-copy {
  order: 0;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.organization-copy h2,
.home-heading.matrix-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 550;
  line-height: 1.4;
  letter-spacing: -0.035em;
  margin: 0;
}
.organization-copy > p:not(.home-kicker) {
  margin: 20px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}
.organization-section .organization-tabs {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 30px auto 0;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--site-radius-panel);
  background: var(--soft);
}
.organization-section .organization-tabs button {
  padding: 8px 16px;
  border: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  border-radius: var(--site-radius-control);
  white-space: nowrap;
  text-align: center;
  color: var(--muted);
}
.organization-section .organization-tabs button[aria-selected="true"] {
  background: var(--ap-panel, white);
  color: var(--ink);
  box-shadow: var(--site-shadow-control);
}
.organization-section .organization-tabs button {
  position: relative;
}
.organization-tabs.has-auto-rotation button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 0;
  height: 2px;
  width: calc((100% - 24px) * var(--preview-progress, 0));
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 24%, transparent);
  pointer-events: none;
  transition: width 100ms linear;
}
.organization-section .organization-tabs button::before {
  content: none;
}
.organization-section .organization-showcase {
  display: block;
  min-height: 760px;
  height: auto;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  overflow: visible;
}
.organization-section .org-panel {
  display: flex;
  flex-direction: column;
  min-height: 760px;
}
.organization-section .panel-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 76px;
  padding: 12px 20px;
  background: transparent;
  border: 0;
  text-align: center;
}
.organization-section .panel-caption p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.organization-section .mock-window {
  height: auto;
  min-height: 0;
  flex: 1;
  background: var(--ap-panel, white);
  border: 1px solid var(--line);
  border-radius: var(--site-radius-panel);
  box-shadow: var(--site-shadow-panel);
  overflow: visible;
}
.organization-section .organization-clean {
  border: 0;
  box-shadow: none;
}
.organization-section .mock-window {
  width: 100%;
  max-width: none;
  margin: 0;
}
.organization-section .org-grouped-list {
  padding: 0;
}
.organization-section .mock-top {
  padding: 20px 24px;
}
.organization-section .mock-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: calc(100% - 64px);
  gap: 12px;
  padding: 18px;
}
.organization-section .mock-board > div {
  padding: 14px 10px;
}
.organization-section .mock-board article {
  padding: 16px 12px;
  font-size: 14px;
  line-height: 1.7;
}
.organization-section .mock-board article small {
  margin-top: 16px;
  font-size: 12px;
}
.organization-section .mock-board h4 {
  font-size: 14px;
  margin-bottom: 18px;
}
.org-time-contexts {
  display: flex;
  gap: 6px;
  padding: 18px 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.org-time-contexts button {
  flex: 1 0 auto;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: var(--site-radius-small);
  cursor: pointer;
}
.org-time-contexts button small {
  margin-left: 8px;
  font-size: 12px;
}
.org-time-contexts button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, white);
}
.org-list-body {
  padding: 4px 24px 20px;
}
.organization-section .org-list-group h4 {
  margin: 22px 0 10px;
  padding: 0;
  font-size: 14px;
  color: var(--ink);
}
.organization-section .mock-row {
  min-height: 40px;
  font-size: 14px;
  padding: 9px 12px;
  gap: 10px;
}
.organization-section .mock-row small {
  font-size: 12px;
}
.home-heading.matrix-heading {
  display: block;
  text-align: center;
  margin: 0 auto 42px;
}
.home-heading.matrix-heading > * {
  text-align: center;
  max-width: none;
}
.home-heading.matrix-heading .home-kicker {
  max-width: none;
}
.org-title-break {
  display: none;
}
.hero-calendar-notes .app-arrow path {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  vector-effect: non-scaling-stroke;
  stroke-width: 1.4px;
}
.organization-section + #more {
  padding-top: 64px;
}
/* Dashed blocks represent suggestions that have not been confirmed. */
.ai-time-block.ai-time-proposed {
  border: 1.5px dashed var(--ap-blue-ink);
  background: color-mix(in srgb, var(--ap-blue) 36%, white);
  color: var(--ap-blue-ink);
}
.ai-time-proposed::after {
  content: "待确认";
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  color: var(--ap-muted);
}
.ai-time-proposed > span {
  display: block;
}
.ai-time-proposed strong {
  padding-right: 40px;
}
.ai-day-card .ai-day-grid {
  flex: 1;
  grid-template-rows: minmax(0, 1fr);
  overflow: visible;
  min-height: 0;
  padding-bottom: 16px;
}
.ai-work-section .ai-messages {
  gap: 15px;
}
.ai-work-section .ai-chat-assistant {
  max-width: 100%;
}
/* Product preview geometry follows ViewFilterChip, ThingsGroupSection and
   ThingsBoardColumn in apps/web/src/components/things. */
.org-work-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.org-work-title .app-icon {
  width: 18px;
  height: 18px;
}
.org-time-contexts {
  flex-wrap: wrap;
  overflow: visible;
  gap: 6px;
}
.org-time-contexts button {
  flex: 0 0 auto;
  padding: 6px 12px;
  min-height: 32px;
  background: transparent;
  border-color: var(--ap-line);
}
.org-time-contexts button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.org-time-contexts button small {
  margin-left: 6px;
}
.org-list-body {
  padding-top: 4px;
}
.organization-section .org-list-group h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.org-list-group h4 > span {
  color: var(--ap-muted);
  font-size: 17px;
}
.org-group-card {
  border: 1px solid var(--ap-line);
  border-radius: var(--site-radius-small);
  overflow: hidden;
}
.organization-section .org-group-card .mock-row {
  min-height: 46px;
  padding: 10px 24px;
  border: 0;
  background: transparent;
}
.organization-section .org-group-card .mock-row + .mock-row {
  border-top: 1px solid var(--ap-line-soft);
}
.organization-section .mock-row .app-check,
.organization-section .mock-row .app-icon {
  flex: none;
  width: 16px;
  height: 16px;
}
.organization-section .mock-row > span:not(.app-check) {
  min-width: 0;
}
.organization-section .mock-row small {
  flex: none;
  white-space: nowrap;
}
.organization-section .mock-board {
  align-items: start;
}
.organization-section .mock-board > div {
  padding: 12px;
  background: var(--ap-soft);
  border-radius: var(--site-radius-small);
}
.organization-section .mock-board h4 {
  padding: 0 0 10px;
  margin: 0;
  font-weight: 500;
}
.organization-section .mock-board article {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  padding: 12px;
  background: var(--ap-panel);
  border: 1px solid var(--ap-line);
  border-radius: var(--site-radius-small);
  box-shadow: none;
}
.organization-section .mock-board .app-check {
  margin-top: 4px;
}
.organization-section .mock-board article small {
  grid-column: 2;
  margin-top: 8px;
  color: var(--ap-muted);
}
.org-page-rules {
  padding: 16px 24px;
  border-bottom: 1px solid var(--ap-line);
}
.org-page-rules summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.org-page-rules summary > span {
  margin-left: 12px;
  font-size: 12px;
  color: var(--ap-muted);
  font-weight: 400;
}
.organization-section .org-page-rules .filter-chips {
  padding: 12px 0 0;
  gap: 6px;
}
.hero-calendar-notes .app-note {
  transform: none;
}
@media (max-width: 767px) {
  .organization-section .org-panel {
    min-height: 760px;
  }
  .org-page-rules {
    padding: 16px 12px;
  }
  .organization-section .org-group-card .mock-row {
    padding-inline: 12px;
  }
  .organization-section .organization-tabs {
    overflow: visible;
    justify-content: center;
  }
  .organization-section .organization-tabs button {
    flex: 1 1 0;
    white-space: normal;
    padding-inline: 8px;
  }
}
@media (max-width: 420px) {
  .organization-section .mock-board {
    grid-template-columns: 1fr;
  }
  .organization-section .mock-row {
    align-items: center;
  }
  .organization-section .mock-row small {
    font-size: 11px;
  }
}
/* Sidebar buttons keep the app's original appearance. Native buttons support keyboard access. */
.coach-scene [data-hero-view] {
  width: 100%;
  border: 0;
  font-family: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.coach-scene [data-hero-view].is-active {
  background: var(--ap-soft);
}
.hero-calendar-view.app-preview {
  flex: 1;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}
.hero-calendar-view .app-main-cal {
  width: 100%;
}
.hero-calendar-view .app-cal-panel {
  height: 672px;
}
.hero-calendar-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-calendar-notes .app-note {
  position: absolute;
  inset: auto;
  width: 160px;
  font-size: 14px;
  margin: 0;
}
.hero-calendar-notes .app-note p {
  white-space: pre-line;
  line-height: 1.6;
}
.hero-calendar-notes .app-arrow {
  width: 140px;
  height: 42px;
  margin: 5px 0 0 -30px;
  transform: scaleX(-1);
}
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.organization-tabs button:active,
.org-time-contexts button:active {
  transform: scale(0.98);
}
@media (max-width: 1080px) {
  .coach-scene [data-app-today] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .coach-scene .app-sidebar {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--ap-line);
  }
  .coach-scene .app-sidebar-top,
  .coach-scene .app-nav > :not([data-hero-view]) {
    display: none;
  }
  .coach-scene .app-nav {
    flex-direction: row;
    gap: 5px;
  }
  .coach-scene [data-hero-view] {
    width: auto;
    min-width: 90px;
  }
  .hero-calendar-notes {
    position: static;
    inset: auto;
    width: auto;
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--ap-soft-2);
  }
  .hero-calendar-notes .app-note {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: auto;
    flex: 1;
    margin: 0;
  }
}
@media (max-width: 767px) {
  .home-section.organization-section {
    padding-top: 60px;
    padding-bottom: 24px;
  }
  .organization-copy {
    width: 100%;
  }
  .organization-copy h2 {
    font-size: 28px;
  }
  .org-title-break {
    display: inline;
  }
  .organization-copy > p:not(.home-kicker) {
    font-size: 14px;
  }
  .organization-section .organization-tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    margin-top: 24px;
    gap: 2px;
  }
  .organization-section .organization-tabs button {
    flex: 1 0 auto;
    padding: 10px 12px;
    font-size: 13px;
  }
  .organization-section .organization-showcase {
    width: 100%;
    height: auto;
    min-height: 760px;
  }
  .organization-section .panel-caption {
    flex-basis: 86px;
    padding: 12px 0;
  }
  .organization-section .panel-caption p {
    font-size: 13px;
  }
  .organization-section .mock-top {
    padding: 16px;
  }
  .organization-section .mock-board {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .org-time-contexts {
    padding: 14px 12px;
  }
  .org-list-body {
    padding: 4px 12px 16px;
  }
  .organization-section .mock-row {
    padding-inline: 0;
    font-size: 13px;
  }
  .organization-section + #more {
    padding-top: 44px;
  }
  .hero-calendar-notes {
    flex-direction: column;
    gap: 10px;
  }
  .hero-calendar-view.app-preview {
    display: block;
    width: 100%;
  }
}

/* Shared chapter typography. Layout stays local; hierarchy has one owner here.
   The existing dark coach chapter keeps equivalent inverse roles. */
.calendar-copy,
.organization-copy,
.home-heading.matrix-heading,
.ai-coach-copy {
  --chapter-text: var(--site-text);
  --chapter-secondary: var(--site-text-secondary);
  --chapter-accent: var(--site-brand);
}
.ai-work-section .ai-coach-copy {
  --chapter-text: var(--site-inverse-text);
  --chapter-secondary: var(--site-inverse-secondary);
  --chapter-accent: var(--site-inverse-accent);
}
.calendar-copy h2,
.organization-copy h2,
.home-heading.matrix-heading h2,
.ai-work-section .ai-coach-copy h2 {
  margin: 0;
  color: var(--chapter-text);
  font-size: var(--site-heading-size);
  font-weight: var(--site-heading-weight);
  line-height: var(--site-heading-leading);
  letter-spacing: -0.035em;
}
.calendar-copy > p:not(.home-kicker),
.organization-copy > p:not(.home-kicker),
.home-heading.matrix-heading > p:not(.home-kicker),
.ai-work-section .ai-coach-copy > p:not(.home-kicker) {
  margin: var(--site-heading-gap) 0 0;
  padding: 0;
  color: var(--chapter-secondary);
  font-size: var(--site-description-size);
  line-height: var(--site-description-leading);
  max-width: 640px;
}
.organization-copy > p:not(.home-kicker),
.home-heading.matrix-heading > p:not(.home-kicker) {
  margin-inline: auto;
}
.calendar-copy .home-kicker,
.organization-copy .home-kicker,
.home-heading.matrix-heading .home-kicker,
.ai-work-section .ai-coach-copy .home-kicker {
  margin: 0 0 18px;
  padding: 0;
  color: var(--chapter-accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
/* Feature-matrix column count, note visibility and desktop-only hiding stay in
   home-layout.css per the 更多功能 PRD; this file must not override them. */
@media (max-width: 767px) {
  :root {
    --site-description-size: 14px;
    --site-heading-gap: 16px;
  }
}

/* Marketing preview frames share elevation; embedded product surfaces keep their own tokens. */
.calendar-visual > .app-preview {
  border: 1px solid color-mix(in srgb, var(--site-border) 40%, transparent);
  border-radius: var(--site-radius-panel);
  box-shadow: var(--site-shadow-panel);
}

/* Keep the bridge on one row; remove the coach before four items become crowded. */
@media (max-width: 820px) {
  .home-bridge {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }
  .home-bridge > span,
  .home-bridge > span:nth-child(4) {
    grid-column: auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    text-align: center;
    font-size: clamp(11px, 2.8vw, 13px);
  }
  .home-bridge > .home-bridge-coach {
    display: none;
  }
}

/* Keep calendar toolbar labels readable without enlarging the time grid. */
@media (max-width: 760px) {
  .app-cal-top .app-cal-title strong {
    font-size: 14px;
  }
  .app-cal-top .app-chip,
  .app-cal-top .app-seg button {
    font-size: 12px;
  }
  .app-cal-top .app-cal-nav {
    width: 22px;
    height: 26px;
    font-size: 17px;
  }
}
