.calc-catalogo,
:root {
  --calc-page-width: min(1488px, calc(100% - 112px));
  --calc-ink: #122033;
  --calc-muted: #5c6b7f;
  --calc-border: #d8e0e8;
  --calc-primary: #1f2933;
  --calc-primary-strong: #111827;
  --calc-blue: #d89a00;
  --calc-surface: #ffffff;
  --calc-surface-soft: #f7f2e8;
  --calc-shadow: 0 18px 42px rgba(18, 32, 51, 0.10);
}

.calc-catalogo {
  background:
    linear-gradient(90deg, rgba(216, 154, 0, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, #fffaf0 0%, #ffffff 48%, #f7f2e8 100%);
  background-size: 72px 72px, auto;
  color: var(--calc-ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

.calc-materiais,
.calc-shell,
.drywall-shell {
  --calc-ink: #122033;
  --calc-muted: #5c6b7f;
  --calc-border: #d8e0e8;
  --calc-primary: #1f2933;
  --calc-primary-strong: #111827;
  --calc-blue: #d89a00;
  --calc-surface: #ffffff;
  --calc-surface-soft: #f7f2e8;
  --calc-shadow: 0 18px 42px rgba(18, 32, 51, 0.10);
}

.calc-public-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--calc-border);
  backdrop-filter: blur(12px);
}

.calc-public-header-inner {
  width: var(--calc-page-width);
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.calc-public-brand img {
  display: block;
  height: 34px;
  width: auto;
}

.calc-public-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.calc-public-brand .brand-wordmark {
  display: none;
  align-items: baseline;
  gap: 0.35rem;
  color: #1f2933;
  font-weight: 900;
  line-height: 1;
}

.calc-public-brand .brand-wordmark span {
  color: #d89a00;
}

.calc-public-brand .brand-wordmark strong {
  color: #1f2933;
}

.calc-public-nav,
.calc-public-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calc-public-nav {
  justify-content: center;
}

.calc-public-nav a {
  color: #34465d;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.calc-public-nav a:hover {
  color: var(--calc-blue);
}

.calc-public-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 11px 18px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.calc-public-btn-primary {
  color: #fff;
  background: var(--calc-primary);
  border-color: var(--calc-primary);
}

.calc-public-btn-primary:hover {
  color: #fff;
  background: var(--calc-primary-strong);
}

.calc-public-btn-secondary {
  color: var(--calc-primary);
  background: #fff;
  border-color: #b9c8d8;
}

.calc-public-btn-secondary:hover {
  color: var(--calc-primary);
  background: #fff4d2;
  border-color: var(--calc-blue);
}

.calc-shell {
  min-height: 100vh;
  width: min(1320px, calc(100% - 48px));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

body:not(.has-hub-sidebar) .calc-shell {
  width: var(--calc-page-width);
}

.calc-shell.container {
  padding-left: 0;
  padding-right: 0;
}

.calc-tools-catalog {
  width: var(--calc-page-width);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

body.has-hub-sidebar .calc-tools-catalog {
  width: min(1320px, calc(100% - 48px));
}

.calc-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid var(--calc-border);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(216, 154, 0, 0.06) 0 1px, transparent 1px 100%),
    var(--calc-surface);
  background-size: 36px 36px, auto;
  box-shadow: var(--calc-shadow);
}

.calc-hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  margin-bottom: 0.75rem;
}

.calc-hero-brand img {
  display: block;
  height: 34px;
  width: auto;
}

.calc-hero-brand span {
  display: none;
}

.calc-kicker {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--calc-blue);
  margin-bottom: 0.45rem;
}

.calc-hero h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(2.1rem, 3.4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 850;
  max-width: 860px;
}

.calc-hero p {
  margin: 0.75rem 0 0;
  max-width: 640px;
  color: var(--calc-muted);
}

.calc-hero-actions {
  display: flex;
  align-items: flex-start;
}

.calc-card {
  border: 1px solid var(--calc-border);
  border-radius: 8px;
  background: var(--calc-surface);
  box-shadow: 0 10px 28px rgba(18, 32, 51, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.calc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(216, 154, 0, 0.12);
  border-color: rgba(216, 154, 0, 0.34);
}

.calc-card-muted {
  background: var(--calc-surface-soft);
}

.calc-card .card-body {
  padding: 1.25rem;
}

.calc-tool-link {
  color: inherit;
  text-decoration: none;
}

.calc-tool-link:hover,
.calc-tool-link:focus {
  color: inherit;
}

.calc-card-visual {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f1f5f9;
  color: var(--tool-color);
}

.calc-card-visual svg,
.calc-card-visual i {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calc-card-visual img {
  display: none;
}

.calc-tool-link-horizontal {
  --tool-color: #d89a00;
  min-height: 246px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-items: center;
  column-gap: 18px;
  row-gap: 14px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
}

.calc-tool-link-horizontal.tone-blue {
  --tool-color: #2563eb;
}

.calc-tool-link-horizontal.tone-green {
  --tool-color: #16a34a;
}

.calc-tool-link-horizontal.tone-gold {
  --tool-color: #d89a00;
}

.calc-tool-link-horizontal.tone-cyan {
  --tool-color: #0891b2;
}

.calc-tool-link-horizontal.tone-orange {
  --tool-color: #d89a00;
}

.calc-tool-link-horizontal.tone-slate {
  --tool-color: #475569;
}

.calc-tool-link-horizontal.tone-teal {
  --tool-color: #0f766e;
}

.calc-tool-link-horizontal .card-body {
  display: contents !important;
  padding: 0;
  min-width: 0;
}

.calc-catalog-section {
  margin-bottom: 22px;
}

.calc-catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.calc-catalog-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1.7vw, 1.85rem);
  font-weight: 850;
  letter-spacing: 0;
}

.calc-tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.calc-tool-grid:not(.is-expanded) .calc-tool-item.is-extra {
  display: none;
}

.calc-tool-item h3 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  line-height: 1.3;
  font-weight: 850;
}

.calc-tool-title {
  display: block;
  grid-column: 1 / -1;
  margin: 0 0 0.6rem;
  font-size: clamp(1.1rem, 1.16vw, 1.32rem);
  line-height: 1.18;
  font-weight: 900;
  color: var(--calc-ink);
}

.calc-tool-item p {
  min-height: 42px;
}

.calc-tool-link-horizontal .text-muted {
  display: -webkit-box;
  grid-column: 1 / -1;
  min-height: 58px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.calc-tool-meta {
  display: block;
  margin: -2px 0 12px;
  color: var(--calc-muted);
  font-weight: 700;
}

.calc-doc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calc-doc-search {
  min-width: min(360px, 38vw);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #b9c8d8;
  border-radius: 6px;
  background: #fff;
  color: var(--calc-muted);
}

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

.calc-empty-state {
  padding: 22px;
  border: 1px dashed #b9c8d8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--calc-muted);
  font-weight: 700;
}

.calc-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  min-height: auto;
  padding: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tool-color);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.calc-card-tag svg,
.hub-card-tag svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.calc-btn {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.calc-btn-primary {
  background: var(--calc-primary);
  border-color: var(--calc-primary);
  color: #fff;
}

.calc-btn-primary:hover,
.calc-btn-primary:focus {
  background: var(--calc-primary-strong);
  border-color: var(--calc-primary-strong);
  color: #fff;
}

.calc-btn-outline {
  border-color: #b9c8d8;
  color: var(--calc-primary);
  background: #fff;
}

.calc-btn-outline:hover,
.calc-btn-outline:focus {
  border-color: var(--calc-blue);
  color: var(--calc-primary);
  background: #fff4d2;
}

.calc-standard-steps {
  display: grid;
  grid-template-columns: repeat(var(--calc-steps, 5), minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.calc-standard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--calc-border);
  border-radius: 6px;
  background: #fff;
  color: #30445b;
  text-align: left;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.calc-standard-step span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9c8d8;
  border-radius: 4px;
  background: #f6f9fc;
  color: var(--calc-primary);
}

.calc-standard-step strong {
  min-width: 0;
  font-size: 0.92rem;
}

.calc-standard-step.is-active,
.calc-standard-step.active,
.calc-standard-step:hover {
  border-color: var(--calc-blue);
  color: var(--calc-primary-strong);
  box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
}

.calc-standard-step.is-active span,
.calc-standard-step.active span {
  border-color: var(--calc-blue);
  background: var(--calc-blue);
  color: #fff;
}

.calc-standard-files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--calc-border);
  border-radius: 8px;
  background: #fff;
}

.calc-standard-file-status {
  color: var(--calc-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.calc-standard-bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0 0;
  margin-top: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 35%);
}

.calc-standard-bottom-nav > :first-child {
  justify-self: start;
}

.calc-standard-bottom-nav > :nth-child(2) {
  justify-self: center;
}

.calc-standard-bottom-nav > :last-child {
  justify-self: end;
}

.border-dashed {
  border: 1px dashed #b9c8d8 !important;
}

.calc-catalogo .text-muted {
  color: var(--calc-muted) !important;
}

@media (max-width: 768px) {
  .calc-public-header-inner {
    width: min(100% - 24px, 1320px);
    min-height: auto;
    padding: 12px 0;
    grid-template-columns: 1fr;
  }

  .calc-public-nav {
    display: none;
  }

  .calc-public-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .calc-public-btn {
    width: 100%;
  }

  .calc-public-brand img {
    height: 44px;
  }

  .calc-public-header-inner {
    width: min(100% - 24px, 1320px);
  }

  .calc-shell {
    width: min(100% - 24px, 1320px);
  }

  body:not(.has-hub-sidebar) .calc-shell {
    width: calc(100% - 24px);
  }

  .calc-tools-catalog {
    width: calc(100% - 24px);
  }

  .calc-hero {
    padding: 1.15rem;
    border-radius: 8px;
  }

  .calc-hero-actions {
    width: 100%;
  }

  .calc-hero-actions .calc-btn {
    width: 100%;
  }

  .calc-catalog-head,
  .calc-catalog-head-search,
  .calc-doc-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .calc-doc-search {
    min-width: 0;
    width: 100%;
  }

  .calc-tool-grid {
    grid-template-columns: 1fr;
  }

  .calc-tool-link-horizontal {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 12px;
    padding: 16px;
    min-height: 190px;
  }

  .calc-card-visual {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .calc-card-visual svg {
    width: 40px;
    height: 40px;
  }

  .calc-tool-title {
    font-size: 1.08rem;
  }

  .calc-card-tag {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    overflow-wrap: anywhere;
  }

  .calc-tool-link-horizontal .text-muted {
    min-height: 0;
    -webkit-line-clamp: 4;
  }

  .calc-standard-steps {
    grid-template-columns: 1fr;
  }

  .calc-standard-bottom-nav {
    grid-template-columns: 1fr;
  }

  .calc-standard-bottom-nav > * {
    justify-self: stretch !important;
  }
}

@media (max-width: 420px) {
  .calc-tool-link-horizontal {
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 14px;
    min-height: 184px;
  }

  .calc-card-visual {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .calc-card-visual svg {
    width: 34px;
    height: 34px;
  }

  .calc-card-visual img {
    object-fit: contain;
  }

  .calc-tool-title {
    font-size: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1099px) {
  .calc-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) and (max-width: 1399px) {
  .calc-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .calc-tool-title {
    font-size: 1.18rem;
  }
}
