@import url(
  'https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap'
);

:root {
  font-family: 'DM Sans', Arial, sans-serif;
  color: #172f3b;
  background: #f7f9fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

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

[hidden] {
  display: none !important;
}


/* HEADER */

.site-header {
  height: 76px;
  background: white;
  border-bottom: 1px solid #e4ebee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(32px, calc((100vw - 1320px) / 2));
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 700;
  color: #143946;
}

.brand-light {
  font-weight: 400;
  color: #458b83;
}

.brand-icon {
  width: 25px;
  height: 25px;
  border: 2px solid #2a8f83;
  border-radius: 5px;
  display: grid;
  place-items: center;
  transform: rotate(-28deg);
}

.brand-icon span {
  width: 14px;
  height: 5px;
  background: #2a8f83;
}

.header-right {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 12px;
  color: #45646b;
}

.header-tag,
.panel-detail,
.eyebrow,
.group-label,
.result-label,
.result-tile > span,
.required-box span,
.key-title,
.formula-strip,
.live-pill {
  font-family: 'IBM Plex Mono', monospace;
}

.header-tag {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #93a6af;
}


/* PAGE */

.page-shell {
  max-width: 1384px;
  margin: auto;
  padding: 35px 32px 70px;
}

.breadcrumbs {
  display: flex;
  gap: 11px;
  font-size: 12px;
  color: #91a1a9;
  margin-bottom: 40px;
}

.breadcrumbs strong {
  color: #355c64;
}

.intro {
  margin-bottom: 34px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #338d82;
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 600;
}

.eyebrow > span {
  width: 20px;
  height: 2px;
  background: #35a293;
}

.eyebrow small {
  color: #a8b6bc;
  margin-left: 10px;
}

h1 {
  font-size: clamp(40px, 5vw, 58px);
  letter-spacing: -2.7px;
  margin: 18px 0 12px;
  line-height: 1;
}

h1 span {
  color: #78a7a6;
  font-weight: 400;
}

.intro p {
  color: #66808b;
  max-width: 680px;
  line-height: 1.6;
  margin: 0;
}


/* WORKSPACE */

.workspace {
  display: grid;
  grid-template-columns:
    minmax(360px, 0.86fr)
    minmax(540px, 1.14fr);
  gap: 20px;
  align-items: start;
}

.output-column {
  display: grid;
  gap: 20px;
}

.panel {
  background: white;
  border: 1px solid #e4ebee;
  border-radius: 13px;
  box-shadow: 0 4px 22px #1b3c4808;
}

.input-panel,
.results-panel,
.drawing-panel {
  padding: 26px 29px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #e6f4f0;
  color: #318f80;
  border-radius: 7px;
  font: 600 11px 'IBM Plex Mono', monospace;
}

.panel h2 {
  font-size: 17px;
  margin: 0;
}

.panel-detail {
  color: #a4b2b9;
  font-size: 9px;
  letter-spacing: 1px;
}


/* INPUTS */

.group-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 27px 0 14px;
  color: #378b82;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
}

.group-label span {
  height: 1px;
  flex: 1;
  background: #e8eef0;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #3c5862;
  margin-bottom: 8px;
}

.field label small {
  font: 400 11px 'IBM Plex Mono', monospace;
  color: #90a6ad;
}

.input-wrap {
  height: 43px;
  border: 1px solid #dce6e9;
  border-radius: 6px;
  background: #fcfdfd;
  display: flex;
  align-items: center;
}

.input-wrap:focus-within,
select:focus {
  border-color: #2d9d8d;
  box-shadow: 0 0 0 3px #2d9d8d18;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  font: 14px 'IBM Plex Mono', monospace;
  color: #1d3e47;
}

.input-wrap span {
  padding: 0 10px;
  border-left: 1px solid #e6ecee;
  color: #8098a1;
  font: 10px 'IBM Plex Mono', monospace;
  white-space: nowrap;
}

select {
  width: 100%;
  height: 43px;
  border: 1px solid #dce6e9;
  border-radius: 6px;
  outline: 0;
  background: #fcfdfd;
  color: #21464e;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.material-info {
  align-self: end;
  min-height: 67px;
  background: #f3f8f7;
  border-radius: 6px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.material-info span {
  font: 600 9px 'IBM Plex Mono', monospace;
  color: #64827f;
}

.material-info strong,
.material-info small {
  font-size: 10px;
  color: #3a5f61;
  margin-top: 4px;
}

.input-error {
  margin-top: 17px;
  color: #b55b4c;
  font-size: 11px;
}


/* TOGGLE */

.toggle-row {
  border: 1px solid #e3eaec;
  border-radius: 7px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.toggle-row strong {
  display: block;
  font-size: 12px;
}

.toggle-row small {
  display: block;
  color: #91a3aa;
  font-size: 10px;
  margin-top: 3px;
}

.toggle input {
  display: none;
}

.toggle span {
  display: block;
  width: 40px;
  height: 22px;
  background: #dce5e7;
  border-radius: 20px;
  position: relative;
  transition: 0.2s;
}

.toggle span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: 0.2s;
}

.toggle input:checked + span {
  background: #39a895;
}

.toggle input:checked + span::after {
  transform: translateX(18px);
}

.key-fields {
  margin-top: 15px;
}


/* RESULTS */

.live-pill {
  color: #31927f;
  font-size: 9px;
  letter-spacing: 1px;
  background: #e7f6ef;
  padding: 7px 9px;
  border-radius: 5px;
}

.live-pill i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #36b88f;
  border-radius: 50%;
  margin-right: 5px;
}

.hero-result {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-size: 9px;
  letter-spacing: 1px;
  color: #88a1a9;
}

.hero-number {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 11px;
}

.hero-number strong {
  font: 500 48px 'IBM Plex Mono', monospace;
  color: #173d44;
}

.hero-number > span {
  font: 16px 'IBM Plex Mono', monospace;
  color: #77a5a2;
}

.hero-result p {
  color: #8b9fa6;
  font-size: 11px;
}

.hero-result p strong {
  color: #3b6669;
}

.separator {
  padding: 0 5px;
}

.utilization-ring {
  width: 105px;
  height: 105px;
  position: relative;
}

.utilization-ring svg {
  transform: rotate(-90deg);
}

.ring-track,
.ring-progress {
  fill: none;
  stroke-width: 8;
}

.ring-track {
  stroke: #e9f1f0;
}

.ring-progress {
  stroke: #35ad9a;
  stroke-linecap: round;
  stroke-dasharray: 314.159;
  stroke-dashoffset: 314.159;
  transition: 0.25s;
}

.utilization-ring > div {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.utilization-ring strong {
  font: 600 18px 'IBM Plex Mono', monospace;
}

.utilization-ring small {
  font: 8px 'IBM Plex Mono', monospace;
  color: #99aab0;
}

.divider {
  height: 1px;
  background: #e8eef0;
  margin: 24px 0;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.result-tile {
  border: 1px solid #e6ecee;
  border-radius: 8px;
  padding: 16px;
}

.result-tile > span {
  color: #839ca5;
  font-size: 9px;
  letter-spacing: 0.6px;
}

.result-tile > strong {
  display: block;
  margin-top: 16px;
  font: 500 24px 'IBM Plex Mono', monospace;
  color: #25474e;
}

.result-tile b {
  font-weight: 500;
}

.result-tile small {
  color: #83a0a4;
  font-size: 11px;
}

.required-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  padding: 15px;
  border: 1px solid #d9ece8;
  background: #f0f7f6;
  border-radius: 8px;
}

.required-box > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.required-box span {
  color: #53877e;
  font-size: 9px;
  letter-spacing: 0.5px;
}

.required-box small {
  color: #87a19c;
  font-size: 10px;
}

.required-box > strong {
  color: #26776f;
  white-space: nowrap;
  font: 600 21px 'IBM Plex Mono', monospace;
}

.required-box b {
  font-weight: 600;
}

.key-title {
  color: #378b82;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}


/* DRAWING */

.drawing-area {
  margin-top: 18px;
  border: 1px solid #edf2f3;
  border-radius: 7px;
  background:
    radial-gradient(
      circle,
      #dce9e9 1px,
      transparent 1px
    )
    0 0 / 16px 16px,
    #fbfdfd;
}

.drawing-area svg {
  width: 100%;
  display: block;
}

.shaft-body {
  fill: #dcebed;
  stroke: #668b93;
  stroke-width: 2;
}

.shaft-break {
  fill: none;
  stroke: #4f7f87;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shaft-section {
  fill: #dcebed;
  stroke: #668b93;
  stroke-width: 2;
}

.shaft-bore {
  fill: #fbfdfd;
  stroke: #668b93;
  stroke-width: 2;
}

.shaft-hidden-line {
  fill: none;
  stroke: #668b93;
  stroke-width: 1.5;
  stroke-dasharray: 7 5;
}

.key-body {
  fill: #369c89;
  stroke: #247c70;
  stroke-width: 2;
}

.keyway-cut {
  fill: #fbfdfd;
  stroke: #668b93;
  stroke-width: 2;
}

.load-line {
  fill: none;
  stroke: #29998b;
  stroke-width: 3;
}

.load-fill {
  fill: #29998b;
}

.drawing-label {
  font: 12px 'IBM Plex Mono', monospace;
  fill: #527482;
}

.dimension-line {
  fill: none;
  stroke: #78949b;
  stroke-width: 1.2;
}

.key-drawing-label {
  font-size: 10px;
  fill: #247c70;
}


.formula-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 13px;
}

.formula-strip > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid #e5edef;
  padding: 4px 10px;
}

.formula-strip > div:last-child {
  border: 0;
}

.formula-strip span {
  color: #9bb0b6;
  font-size: 8px;
}

.formula-strip code {
  color: #3d6a6d;
  font-size: 12px;
}

.calculation-toggle {
  width: 100%;
  margin-top: 20px;
  border: 1px solid #dce7e9;
  background: #f8fbfb;
  border-radius: 6px;
  padding: 11px;
  color: #3b7774;
  cursor: pointer;
  font-weight: 600;
}

.calculation-details {
  margin-top: 15px;
  padding: 16px;
  background: #f8fbfb;
  border-radius: 7px;
  color: #58737a;
  font: 11px/1.8 'IBM Plex Mono', monospace;
}

.calculation-details h4 {
  color: #2f6f6c;
  margin: 14px 0 4px;
}

.method-note {
  margin-top: 22px;
  color: #879ba3;
  font-size: 11px;
  line-height: 1.6;
}


/* RESPONSIVE */

@media (max-width: 900px) {

  .workspace {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {

  .site-header {
    padding: 0 16px;
  }

  .header-tag {
    display: none;
  }

  .page-shell {
    padding: 28px 16px 50px;
  }

  .input-panel,
  .results-panel,
  .drawing-panel {
    padding: 20px 16px;
  }

  .field-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero-number strong {
    font-size: 38px;
  }

}