/* PLANTAE · Caulê · R28. Approved visual direction, applied to existing views.
 * Pure presentation: no state, visibility, routing, plan or hardware changes.
 * Assets and fonts are local and included in the offline/Android shell.
 */
@font-face { font-family: "Plantae Nunito"; src: url("assets/identity/caule/fonts/Nunito.ttf") format("truetype"); font-style: normal; font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Plantae Barlow"; src: url("assets/identity/caule/fonts/Barlow-Regular.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Plantae Barlow"; src: url("assets/identity/caule/fonts/Barlow-SemiBold.ttf") format("truetype"); font-style: normal; font-weight: 600 900; font-display: swap; }
:root {
  --font-body: "Plantae Barlow", ui-sans-serif, system-ui, sans-serif;
  --font-heading: "Plantae Nunito", ui-sans-serif, system-ui, sans-serif;
  --caule-paper: #fffaf0;
  --caule-cream: #f4eddf;
  --caule-sage: #e8edda;
  --caule-lilac: #ece4ef;
  --caule-peach: #f3e2d3;
  --caule-plum: #37213e;
  --caule-purple: #71389c;
  --caule-muted: #665869;
  --caule-forest: #27543d;
  --caule-line: #d2bdcf;
  --caule-frame: 29px 22px 31px 21px;
  --caule-frame-small: 19px 15px 21px 16px;
  --cartoon-frame: var(--caule-frame);
  --cartoon-frame-small: var(--caule-frame-small);
  --cartoon-paper: var(--caule-paper);
  --warm-white: var(--caule-paper);
  --cream-50: var(--caule-paper);
  --cream-100: var(--caule-cream);
  --gray-500: var(--caule-muted);
  --gray-700: #55495a;
  font-family: "Plantae Barlow", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
}
body { color: var(--caule-plum); background: #e5e8d9; }
.app { background: var(--caule-sage); border: 1px solid #72567a; box-shadow: 0 22px 70px #37213e20; }
h1, h2, h3, h4, .section-heading h3, .guide-hero h2, .rewards-hero h2, .drying-hero h2,
.cd-hero h2, .cd-post h3, .cd-profile h3, .cd-section-title, .cd-empty h2, .cd-empty h3,
.cd-dialog h2, .sd-dialog h2, .ac-menu-head h2 {
  font-family: "Plantae Nunito", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.025em;
}
h2 { font-size: 30px; line-height: 1.12; }
.app p { line-height: 1.5; }
.app small, dialog small { font-size: 12px; line-height: 1.4; }
.app .eyebrow { font-size: 12px; color: var(--caule-purple); letter-spacing: .08em; }
.app button, dialog button { font-family: "Plantae Barlow", ui-sans-serif, system-ui, sans-serif; }
.app input:not([type=checkbox]):not([type=radio]):not([type=range]), .app select, .app textarea,
dialog input:not([type=checkbox]):not([type=radio]):not([type=range]), dialog select, dialog textarea { font-size: 16px; border-radius: 15px; border-color: var(--caule-line); }
.app :is(.primary-button,.secondary-button,.quiet-button,.text-button,.cd-primary,.cd-secondary,.sd-primary),
dialog :is(.primary-button,.secondary-button,.quiet-button,.text-button) { min-height: 44px; font-size: 15px; }

/* Keep room switching, menu and reminders available underneath the wordmark. */
.topbar { height: auto; padding: 0; display: block; color: var(--caule-plum); background: var(--caule-paper); border-bottom: 1px solid var(--caule-line); }
.caule-brand-row { min-height: 74px; padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.caule-wordmark { display: inline-flex; align-items: center; gap: 8px; padding: 0; min-height: 44px; min-width: 0; border: 0; background: transparent; color: var(--caule-purple); cursor: pointer; }
.caule-wordmark span { font-family: "Plantae Nunito", sans-serif; font-size: 30px; font-weight: 1000; letter-spacing: -.055em; line-height: 1; }
.caule-wordmark .icon { width: 25px; height: 29px; flex-shrink: 0; }
.caule-help-entry { display: inline-flex; align-items: center; gap: 7px; min-height: 48px; max-width: 155px; padding: 5px 10px 5px 5px; color: var(--caule-plum); background: #eee4f1; border: 1px solid #d8c1e2; border-radius: 22px 18px 23px 18px; cursor: pointer; }
.caule-help-entry>span:last-child { text-align: left; }
.caule-help-entry small { display: block; font-size: 12px; line-height: 1.15; }
.caule-help-entry strong { display: block; font-size: 14px; margin-top: 3px; }
.caule-header-avatar { display: block; width: 36px; height: 36px; flex: 0 0 36px; position: relative; overflow: hidden; border-radius: 50%; background: #d9e5c8; }
.caule-header-avatar img { position: absolute; width: 72px; max-width: none; height: auto; left: -17px; top: -10px; }
.caule-context-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 6px; padding: 0 15px 5px; min-height: 48px; background: #fffaf0; }
.caule-context-row .cultivation-picker { min-width: 0; max-width: 100%; font-size: 14px; font-weight: 600; }
.caule-context-row [data-context-title] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.caule-context-row .icon-button:hover { background: #eadfeb; }
.notification-dot { border-color: var(--caule-paper); }
.caule-wordmark:focus-visible,.caule-help-entry:focus-visible { outline: 3px solid var(--caule-purple); outline-offset: 3px; }

/* Each family gets an illustration. Dense forms and numerical groups stay opaque. */
.view { --caule-view-gutter: 22px; --caule-view-top: 24px; --caule-area-art: url("assets/identity/caule/backgrounds/fundo-cultivo.png"); --caule-area-tint: var(--caule-sage); background-color: var(--caule-area-tint); background-image: linear-gradient(180deg,#fffaf0e8,#fffaf0ed),var(--caule-area-art); background-size: auto,auto 650px; background-position: center,right top; background-repeat: no-repeat; }
.view[data-view=room] { --caule-area-art: url("assets/identity/caule/backgrounds/fundo-ambientes.png"); }
.view[data-view=modules],.view[data-view=sensors] { --caule-area-art: url("assets/identity/caule/backgrounds/fundo-medicoes.png"); --caule-area-tint: var(--caule-lilac); }
.view[data-view=community] { --caule-area-art: url("assets/identity/caule/backgrounds/fundo-comunidade.png"); --caule-area-tint: var(--caule-peach); }
.view[data-view=shopping] { --caule-area-art: url("assets/identity/caule/backgrounds/fundo-loja.png"); --caule-area-tint: var(--caule-lilac); }
.view[data-view=setup],.view[data-view=analysis],.view[data-view=security],.view[data-view=calendar] { background: var(--caule-cream); }
.today-view>.view-heading, .room-view>.room-heading, .guide-hero, .cm-page-heading, .sd-hero, .cd-hero {
  position: relative; isolation: isolate; min-height: 195px; margin: calc(-1 * var(--caule-view-top)) calc(-1 * var(--caule-view-gutter)) 24px; padding: 25px var(--caule-view-gutter) 23px; border: 0; border-bottom: 1px solid #ffffff90; border-radius: 0 0 32px 22px;
  color: var(--caule-plum); background-color: var(--caule-paper); background-image: linear-gradient(90deg,#fffaf0fa 0,#fffaf0eb 30%,#fffaf0ab 59%,#fffaf008 88%),var(--caule-area-art); background-position: center,right center; background-size: cover; background-repeat: no-repeat; box-shadow: none;
}
.today-view>.view-heading h2, .room-view>.room-heading h2, .guide-hero h2, .cm-page-heading h2, .sd-hero h2, .cd-hero h2 { font-family: "Plantae Nunito",sans-serif; font-weight: 900; color: var(--caule-plum); font-size: 31px; line-height: 1.08; max-width: 70%; }
.today-view>.view-heading p, .room-view>.room-heading p, .guide-hero>p, .cm-page-heading>div>p, .sd-hero p { max-width: 67%; color: var(--caule-plum); font-size: 16px; }
.today-view>.view-heading .eyebrow, .room-view>.room-heading .eyebrow, .guide-hero .eyebrow, .cm-page-heading .eyebrow, .sd-hero .eyebrow { color: var(--caule-purple); font-size: 12px; }
.room-view>.room-tabs { margin-top: -13px; margin-bottom: 23px; }
.room-view>.room-heading { margin-top: 0; }
.room-heading>div { flex: 1; min-width: 0; }
.room-heading h2 { overflow-wrap: anywhere; }
.room-heading .room-menu-button { background: #fffaf0f2; flex-shrink: 0; }
.cm-page-heading { display: block; }
.cm-page-heading h2 { max-width: 75%; }
.cm-page-heading .cm-demo-toggle { margin-top: 12px; background: #fffaf0f2; }
.guide-hero { display: block; margin-inline: 0; }
.guide-hero .guide-search { max-width: 100%; margin-top: 20px; background: var(--caule-paper); }
.view[data-view=sensors]>.view-heading { border-bottom: 1px solid var(--caule-line); padding-bottom: 16px; }

/* Organic outlines identify a group; lists and nested controls remain quieter. */
.first-journey,.today-plantulo,.calendar-entry-card,.empty-card,.guide-empty,.mr-empty,.mh-empty,
.room-overview-card,.room-next-step,.mr-room-entry,.community-entry,.plantulo-card,.guide-result-card,
.cm-card,.mh-panel,.mr-section,.rb-panel,.cm-connected,.cm-setup-card,.ss-card,.ap-shell,.dp-shell,
.cd-post,.cd-profile,.sd-product,.sd-order,.ac-plan,.equipment-card,.drying-lot-card {
  border-radius: var(--caule-frame); border-color: var(--caule-line); box-shadow: 0 3px 0 #37213e09;
}
.cm-card,.mh-panel,.mr-section,.rb-panel,.ss-card,.today-plantulo,.empty-card,.guide-result-card,.sd-product,.cd-post,.cd-profile,
.room-next-step,.mr-room-entry,.calendar-entry-card,.first-journey { background: var(--caule-paper); }
.today-plantulo { background: #edf0db; color: var(--caule-plum); border: 1px solid #90a878; }
.today-plantulo small,.today-plantulo span[data-today-reason] { color: #4b5c43; }
.today-plantulo strong { color: var(--caule-plum); font-family: "Plantae Nunito",sans-serif; }
.first-journey { border-color: #9aac83; }
.first-journey [data-first-journey-progress] { flex-shrink: 0; white-space: nowrap; font-size: 13px; }
.plantulo-copy h3 { font-family: "Plantae Nunito",sans-serif; font-weight: 800; }
.app :is(.plantulo-card,.lighting-card,.rewards-hero) .eyebrow { color: #ecd798; }
.first-journey-step { border-radius: var(--caule-frame-small); }
.first-journey-step small,.first-journey-step p,.first-journey-step button { font-size: 14px; }
.first-journey-step h3,.first-journey-step strong { font-size: 18px; }
.section-block { background: var(--caule-paper); border-radius: var(--caule-frame); padding: 18px; }
.section-block .section-block { background: transparent; border-radius: 0; padding: 0; }
.section-heading h3 { font-size: 23px; font-weight: 800; }
.room-summary { background: var(--caule-paper); border-radius: var(--caule-frame-small); padding: 6px; }
.room-summary>span { background: transparent; }
.today-metrics,.results-grid,.cm-metrics { background: var(--caule-paper); border-radius: var(--caule-frame); }
.today-metrics article strong,.cm-metric>strong { font-family: "Plantae Barlow",sans-serif; font-variant-numeric: tabular-nums; color: var(--caule-plum); }
.today-metrics article strong { font-size: 25px; }
.cm-metric>strong { font-size: 34px; }
.cm-metric-label,.cm-muted,.cm-context-note,.cm-status,.cm-chart-caption,.cm-card .eyebrow,
.cm-tabs small,.cm-equipment small,.mh-caption,.sensor-node-status,.sensor-node-meta span,
.sensor-metric-card span,.sensor-metric-card small,.bench-channel-card small { font-size: 12px; }
.cm-metric { padding: 16px 12px; }
.cm-metric-label { min-height: 32px; }
.cm-metric>strong small { font-size: 14px; }
.cm-content-grid p,.cm-setup-card>p:not(.eyebrow),.cm-card p { font-size: 14px; }
.cm-tabs button { border-radius: var(--caule-frame-small); }
.room-tabs button,.cm-chart-tabs button,.mh-tabs button,.sd-tabs button,.cd-tabs button { border-radius: 19px 18px 0 0; font-size: 14px; }
.primary-button,.secondary-button,.quiet-button,.cd-primary,.cd-secondary,.sd-primary,.sd-product button,.rb-primary { border-radius: 17px 14px 18px 14px; }
.primary-button,.cd-primary,.sd-primary,.sd-product button,.rb-primary { background: var(--caule-forest); border-color: var(--caule-forest); box-shadow: 0 3px 0 #1d3f2e; }
.primary-button:disabled,.cd-primary:disabled,.sd-primary:disabled,.sd-product button:disabled,.rb-primary:disabled { box-shadow: none; }
.field input,.field select,.field textarea,.unit-input { border-radius: 15px; background: var(--caule-paper); }
.unit-input input { border: 0; border-radius: 0; background: transparent; }
.bottom-nav { background: #fffaf0f7; border-top: 1px solid var(--caule-line); }
.nav-button { border-radius: 21px 17px 22px 16px; font-size: 12px; }
.nav-button.is-active { background: #e9d9f1; color: var(--caule-purple); }
/* A readable, app-aligned action; reserve enough scroll room for the final card. */
.app:has(> .floating-quick-add:not([hidden])) { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
.quick-add.floating-quick-add {
  left: auto; right: max(16px, calc((100vw - 520px) / 2 + 16px), calc(env(safe-area-inset-right, 0px) + 12px));
  bottom: max(90px, calc(80px + env(safe-area-inset-bottom, 0px))); transform: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; min-width: 132px; height: 48px; padding: 0 17px 0 14px;
  border: 1px solid #552477; border-radius: 17px 15px 18px 15px;
  background: var(--caule-purple); color: var(--caule-paper); font-size: 16px; font-weight: 700; line-height: 1;
  box-shadow: 0 3px 0 #4b2565, 0 7px 18px #37213e24;
}
.quick-add-symbol { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.quick-add.floating-quick-add:hover { background: #623087; }
.quick-add.floating-quick-add:focus-visible { outline: 3px solid var(--caule-paper); outline-offset: 3px; box-shadow: 0 0 0 6px var(--caule-purple); }
.quick-add.floating-quick-add:active { background: #552477; box-shadow: 0 1px 0 #4b2565; }
.quick-dialog,.guide-article-dialog,.cm-dialog,.ap-dialog,.dp-dialog,.ac-dialog,.sd-dialog,.cd-dialog,#module-registry-editor { border-radius: 28px 22px 29px 22px; background: var(--caule-paper); }

/* Social remains a local demonstration. Do not hide provenance/status text. */
.community-entry { background: #f0e1ed; color: var(--caule-plum); }
.community-entry small,.community-entry em { font-size: 12px; }
.community-entry-icon { background: #e4cce9; }
.cd-community { --cd-paper: var(--caule-paper); --cd-ink: var(--caule-plum); --cd-muted: #675564; --cd-line: #d6c0cd; }
.cd-demo-line { margin-top: 0; font-size: 12px; }
.cd-demo-line>span:last-child { font-size: 12px; }
.cd-hero { margin-top: 0; min-height: 250px; display: block; background-image: linear-gradient(90deg,#fffaf0fa 0,#fffaf0df 30%,#fffaf08a 56%,#fffaf000 85%),url("assets/identity/caule/backgrounds/fundo-comunidade.png"); }
.cd-hero>div { padding: 0; }
.cd-hero>img { display: none; }
.cd-hero h2 { max-width: 73%; }
.cd-hero p:not(.cd-eyebrow) { font-size: 16px; line-height: 1.4; max-width: 61%; color: var(--caule-plum); }
.cd-eyebrow { font-family: "Plantae Barlow",sans-serif!important; font-size: 12px!important; color: var(--caule-purple); }
.cd-status,.cd-date,.cd-post header small,.cd-post-tag,.cd-comment-preview,.cd-record small,.cd-record>span,.cd-role-chips span,.cd-bottom-note,.cd-data,.cd-help,.cd-comment-list small { font-size: 12px; }
.cd-post header strong,.cd-post-copy>p,.cd-profile p { font-size: 16px; }
.cd-post h3 { font-size: 24px; }
.cd-community .cd-primary,.cd-community .cd-secondary,.cd-dialog .cd-primary,.cd-dialog .cd-secondary { font-size: 15px!important; min-height: 44px; }
.cd-reactions button,.cd-icon,.cd-post footer button,.cd-text-button { min-height: 44px; }
.cd-reactions small,.cd-icon small { font-size: 12px; }
.cd-post footer button { font-size: 13px; }
.cd-dialog label,.cd-dialog input[type=file],.cd-photo-field>small { font-size: 14px; }
.cd-dialog input:not([type=file]),.cd-dialog select,.cd-dialog textarea { font-size: 16px; }
.cd-profile-cover { background-image: linear-gradient(90deg,#f3e2d3c0,#eee4f100),url("assets/identity/caule/backgrounds/fundo-comunidade.png"); background-size: cover; background-position: center; }

/* Store keeps the existing catalog, prices, cart and explicit checkout demo. */
.sd-hero { min-height: 230px; }
.sd-hero h2 { max-width: 70%; }
.sd-demo { background: #f4eaf8; border-color: var(--caule-purple); border-radius: 13px; }
.sd-product { background: var(--caule-paper); }
.sd-product strong { color: var(--caule-purple); font-variant-numeric: tabular-nums; font-size: 28px; }
.sd-product h3 { font-size: 23px; }
.sd-product p { font-size: 15px; }
.sd-tag,.sd-product small { font-size: 12px; }
.sd-product button { font-size: 15px; }
.sd-dialog p { font-size: 16px; }

@media(max-width:600px) {
  .caule-brand-row { padding-inline: 16px; }
  .cd-hero>img { display: none; }
  .cd-hero>div { padding: 0; }
  .cd-hero h2 { font-size: 31px; }
  .cm-page-heading h2 { font-size: 29px; }
  .cm-card { padding: 17px; }
  .cm-context { flex-wrap: wrap; }
  .cm-context select { max-width: 100%; }
  .cm-status { text-align: left; }
}
@media(max-width:450px) { .view { --caule-view-gutter: 16px; --caule-view-top: 20px; } }
@media(max-width:380px) {
  .caule-brand-row { gap: 7px; padding-inline: 12px; }
  .caule-wordmark { gap: 5px; }
  .caule-wordmark span { font-size: 28px; }
  .caule-wordmark .icon { width: 22px; }
  .caule-help-entry { gap: 4px; padding-right: 7px; }
  .caule-header-avatar { width: 30px; height: 34px; flex-basis: 30px; }
  .caule-help-entry small { font-size: 12px; }
  .today-view>.view-heading h2,.room-view>.room-heading h2,.guide-hero h2,.sd-hero h2,.cd-hero h2 { font-size: 29px; }
  .today-view>.view-heading p,.room-view>.room-heading p,.guide-hero>p,.sd-hero p { max-width: 73%; }
  .cd-post header { gap: 7px; }
  .cd-post-tag { max-width: 80px; overflow-wrap: anywhere; }
  .cm-metric>strong { font-size: 29px; }
  .today-metrics article strong { font-size: 22px; }
}
@media(prefers-reduced-motion:reduce) { .view { animation: none; } }
