.tc {
  --tc-paper: #f5f9ff;
  --tc-blue: #bbe0ff;
  --tc-line: #a0c4e8;
  --tc-ink: #1a1a1a;
  --tc-muted: #4a6a8a;
  min-height: 100vh;
  background: radial-gradient(ellipse at 88% 0, var(--tc-blue), transparent 43rem), var(--tc-paper);
  color: var(--tc-ink);
}
.tc-header { display: flex; justify-content: center; padding: 13px 16px; background: var(--tc-blue); border-bottom: 1px solid var(--tc-line); }
.tc-layout { width: min(1152px, calc(100% - 48px)); min-height: calc(100vh - 130px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 28px; padding: 24px 0 54px; align-items: start; }
.rb-page-breadcrumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 20px 24px; font: 500 14px Inter, Arial, sans-serif; color: #666; }
.rb-page-breadcrumbs a { color: #666; text-decoration: none; }
.rb-page-breadcrumbs a:hover { text-decoration: underline; color: #1a1a1a; }
.rb-page-breadcrumbs .rb-current { overflow-wrap: anywhere; }
.rb-breadcrumb-separator { color: #999; }
@media (max-width: 768px) {
  .rb-page-breadcrumbs { margin: 0 12px 20px; font-size: 13px; gap: 6px; }
}
.tc-intro { margin: 0 20px 22px; }
@media (max-width: 768px) { .tc-intro { margin-inline: 12px; } }
.tc-intro h1 { font-size: 36px; font-weight: 700; color: #1a1a1a; margin-bottom: 16px; font-family: 'Inter', sans-serif; }
@media (max-width: 768px) { .tc-intro h1 { font-size: 28px; } }
.tc-intro p { font-size: 16px; color: #666; }
.tc-tool, .tc-panel, .tc-meals { border: 1px solid #e0e8f0; border-radius: 30px; box-shadow: 0 16px 42px #4a6a8a18; }
.tc-tool { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 24px; color: var(--tc-ink); text-decoration: none; background: linear-gradient(120deg, white 35%, var(--tc-paper), var(--tc-blue)); transition: box-shadow .18s, transform .18s; }
.tc-tool:hover { transform: translateY(-2px); box-shadow: 0 14px 42px #4a6a8a32; }
.tc-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; background: linear-gradient(145deg, white, var(--tc-blue)); color: var(--tc-muted); }
.tc-icon svg { width: 44px; height: 44px; }
.tc-tool-text { display: grid; gap: 5px; }
.tc-tool-text strong { font-size: clamp(19px, 3vw, 24px); line-height: 1.2; }
.tc-tool-text > span { color: var(--tc-muted); font-size: .92rem; }
.tc-action { display: inline-flex; gap: .55em; align-items: center; justify-content: center; min-height: 46px; padding: 9px 18px; border: 1px solid #83b9df; border-radius: 999px; font: 600 .92rem/1.35 Inter, sans-serif; background: var(--tc-blue); color: #173f60; text-decoration: none; cursor: pointer; }
.tc-action:hover { background: #a8d5f8; }
.tc-action:disabled { opacity: .5; cursor: default; }
.tc :focus-visible { outline: 3px solid #4a6a8a; outline-offset: 4px; }
.tc-panel { background: white; padding: clamp(16px, 3vw, 26px); }
.tc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 18px; }
.tc-fields label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; min-width: 0; }
.tc-fields input, .tc-fields select { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #c6d7e7; border-radius: 16px; padding: 9px 12px; background: var(--tc-paper); color: var(--tc-ink); font: 400 16px/1.3 Inter, sans-serif; }
.tc-wide { grid-column: 1 / -1; }
.tc-error { margin-top: 9px; color: #a12624; font-size: .88rem; }
.tc-result { display: grid; justify-items: start; gap: 4px; border-radius: 24px; background: linear-gradient(130deg, var(--tc-paper), var(--tc-blue)); margin-top: 18px; padding: 17px 20px; color: #2d4a65; }
.tc-result strong { font-size: clamp(31px, 5vw, 46px); line-height: 1.1; color: var(--tc-ink); font-variant-numeric: tabular-nums; }
.tc-meals { background: white; margin-top: 15px; padding: 15px 20px; }
.tc-meals summary { font-weight: 600; cursor: pointer; }
.tc-meals p { margin: 10px 0; color: #384f64; }
@media (max-width: 850px) {
  .tc-layout { display: flex; flex-direction: column; width: min(680px, calc(100% - 32px)); padding: 24px 0; min-height: 0; }
}
@media (max-width: 480px) {
  .tc-tool { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .tc-icon { width: 52px; height: 52px; border-radius: 17px; }
  .tc-icon svg { width: 33px; height: 33px; }
  .tc-tool .tc-action { grid-column: 1 / -1; justify-self: start; }
  .tc-fields { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tc-tool { transition: none; } }

.tc .notifications-badge:not([hidden]) { display: block; }
.tc .notifications-dropdown { width: min(320px, calc(100vw - 32px)); right: -58px; }
.tc .notifications-dropdown.show { display: block !important; }
.tc .notifications-list { padding: 12px 14px; }
.tc-notification-item { display: grid; gap: 4px; padding: 8px 0; color: var(--tc-ink); overflow-wrap: anywhere; }
.tc-menu { position: fixed; inset: 0 auto 0 0; margin: 0; width: min(340px, 92vw); max-width: none; height: 100%; max-height: none; padding: 0; border: 0; color: var(--tc-ink); background: white; }
.tc-menu::backdrop { background: #14253777; }
.tc-menu .panel-header { position: sticky; top: 0; }
.tc .footer { margin-top: 18px; }

.tc-calories { --tc-calorie-action-gap: 18px; }
.tc-calories .rb-page-breadcrumbs, .tc-calories .tc-intro { margin-bottom: 16px; }
#tc-calorie-form > .tc-fields { margin-bottom: var(--tc-calorie-action-gap); }
#tc-calorie-form > .tc-action { display: flex; width: fit-content; }
.tc-calories #tc-result { margin-top: var(--tc-calorie-action-gap); }
.tc-goal { display: flex; flex-wrap: wrap; gap: 8px; border: 0; min-width: 0; }
.tc-goal legend { margin-bottom: 8px; font-size: .9rem; font-weight: 600; }
.tc-goal label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 12px; border: 1px solid #c6d7e7; border-radius: 999px; background: var(--tc-paper); cursor: pointer; }
.tc-goal label:has(:checked) { background: linear-gradient(120deg, var(--tc-paper), var(--tc-blue)); border-color: var(--tc-line); }
.tc-goal input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--tc-muted); }
@media (max-width: 850px) {
  .tc .notifications-dropdown { position: fixed; top: 66px; right: 16px; }
}
.tc-tool + .tc-tool { margin-top: 18px; }

#guests-result > details { margin-top: 18px; }
#guests-menu { margin: 12px 0 0; padding-inline-start: 1.5em; }

#guests-result > .tc-result {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

#guests-result > .tc-result output {
  font: inherit;
}

@media (max-width: 600px) {
  #guests-result > .tc-result {
    font-size: 18px;
  }
}

/* Mirror the page glow just above the footer. */
.tc {
  isolation: isolate;
}
.tc .footer {
  position: relative;
}
.tc .footer::before {
  content: "";
  position: absolute;
  inset: auto 0 100%;
  height: 43rem;
  background: radial-gradient(ellipse at 12% 100%, var(--tc-blue), transparent 43rem);
  mask-image: linear-gradient(to bottom, transparent, black 35%);
  pointer-events: none;
  z-index: -1;
}

#yeast-example { margin-top: 18px; }

#measures-form > p:has(#measures-choose:not([hidden])) {
  margin: 0 0 14px;
}

#measures-picker[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(540px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

#measures-form > #measures-hint {
  margin: 0 0 18px;
}

#measures-form > button[type="submit"] {
  display: flex;
  width: fit-content;
}

#measures-result:not([hidden]) {
  padding-top: 18px;
}

#measures-result > .tc-result {
  margin-top: 0;
}

.tc-layout.tc-catalog {
  min-height: 0;
  padding-bottom: 0;
}

.tc .tc-catalog + .footer {
  margin-top: 50px;
}

/* Shopping calculator result */
#shopping-result .tc-result {
  box-sizing: border-box;
  padding-inline: 20px;
}
#shopping-result #shopping-list {
  margin: 0;
  padding: 0;
  min-width: 0;
  list-style-position: inside;
  overflow-wrap: anywhere;
}


/* rb-mobile-brine-yeast01 */
@media (max-width: 850px) {
  html body main.tc-layout.rb-mobile-brine-yeast01 {
    display: block !important;
    box-sizing: border-box;
    width: calc(100% - 32px) !important;
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body main.tc-layout.rb-mobile-brine-yeast01 > div,
  html body main.tc-layout.rb-mobile-brine-yeast01 .tc-panel,
  html body main.tc-layout.rb-mobile-brine-yeast01 .tc-panel > form {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  html body main.tc-layout.rb-mobile-brine-yeast01 .tc-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  html body main.tc-layout.rb-mobile-brine-yeast01 .tc-fields > *,
  html body main.tc-layout.rb-mobile-brine-yeast01 .tc-fields label {
    min-width: 0;
  }
  html body main.tc-layout.rb-mobile-brine-yeast01 .tc-fields input,
  html body main.tc-layout.rb-mobile-brine-yeast01 .tc-fields select {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }
}

.tc #tc-notifications[hidden] { display: none; }

@media (max-width: 768px) {
  .tc-menu .panel-close,
  .tc-menu .panel-close:hover,
  .tc-menu .panel-close:active {
    background: transparent;
    border-radius: 0;
  }
}

/* calculators-menu-focus-v2 */
.tc-menu #tc-menu-title:focus {
  outline: none;
}

/* rb-calculator-ads-v1 */
.tc-layout > .tc-ad-rail { display: none; }
@media (min-width: 851px) {
  .tc-layout > .tc-ad-rail:not([hidden]) {
    display: block;
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    min-width: 0;
  }
  .tc-ad-sticky {
    position: sticky;
    top: 96px;
    width: 100%;
    max-width: 268px;
  }
}
@media (max-height: 720px) {
  .tc-ad-sticky { position: static; }
}
