
.hc-report {
    width: 1080px;
    height: 1920px;
    background: #ffffff;
    padding: 32px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
  }
  .hc-report::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 70px solid #ff6600;
    border-right: 70px solid transparent;
    z-index: 1;
    box-sizing: border-box;
  }
  .triangle-layer-2 {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 60px solid #b94e20;
    border-right: 60px solid transparent;
    z-index: 2;
  }
  .triangle-layer-3 {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 40px solid #933b14;
    border-right: 40px solid transparent;
    z-index: 3;
  }
  .hc-report::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-bottom: 40px solid #933b14;
    border-left: 40px solid transparent;
    z-index: 1;
    box-sizing: border-box;
  }
  .hc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 6px solid #e9eaeb;
    padding-bottom: 2rem;
    margin-bottom: 1rem;
    gap: 2.5rem;
  }
  .hc-title h1 {
    margin: 0;
    font-size: 2rem;
    color: #0f3b39;
    letter-spacing: 0.5px;
  }
  .hc-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 1.1rem;
    color: #88959e;
    min-width: 28rem;
  }
  .hc-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(8rem, 1fr));
    column-gap: 1.75rem;
  }
  .hc-meta span {
    color: #ff6600;
    font-weight: 600;
    margin-left: 4px;
  }
  .hc-user-cell {
    text-align: left;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .hc-user-cell .data-nameid {
    display: inline-block;
    word-break: break-all;
    overflow-wrap: break-word;
    text-align: left;
    line-height: 1.4;
  }
  .summary-row {
    display: grid;
    grid-template-columns: 390px 1px 1fr;
    gap: 0;
    margin-bottom: 1rem;
    overflow: hidden;
  }
  .card {
    padding: 18px 22px;
  }
  .assessment-card-tcf{
    display: flex;
    align-items: center;
    gap: 18px;
  }
  .assessment-card-content-tcf {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    margin-left: -22px;
  }
  .assessment-card-tcf .score {
    font-size: 9rem;
    color: #ff6600;
    margin: 0;
    font-weight: 700;
    line-height: 1;
    margin-top: -1rem;
  }
  .assessment-card-tcf h3 {
    color: #3c3c3c;
    letter-spacing: 1px;
    font-size: 1.5rem;
    margin: 0 0 4px 0;
    text-align: right;
  
   
  }
  .assessment-card-tcf .tagline {
    font-size: 1.3rem;
    color: #9ba7b0;
    margin-top: 4px;
    align-self: flex-end;
  }
  .summary-divider {
    width: 1px;
    background-color: #e9eaeb;
  }
  .control-card {
    border-left: 6px solid #e9eaeb;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .control-card h3 {
    margin: 0 0 24px;
    font-size: 1.5rem;
    color: #3c3c3c;
  }
  .control-row {
    display: flex;
    gap: 50px;
    align-items: baseline;
  }
  .control-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
  }
  .control-label {
    font-size: 1.5rem;
    color: #9ba7b0;
  }
  .control-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6600;
  }
  .analysis-section {
    border:6px solid #e9eaeb;
    overflow: hidden;
    margin-bottom: 10px;
  }
  .analysis-header {
    display: flex;
  }
  .analysis-side-title {
    width: 74px;
    border-right: 6px solid #e9eaeb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #3c3c3c;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1px;
    padding: 18px 0;
    font-size: 1.5rem;
  }
  .analysis-content {
    flex: 1;
    font-size: 1.2rem;
  }
  .analysis-header-row {
    display: flex;
    background: #e9eaeb;
    color: #9ba7b0;
    letter-spacing: 0.5px;
  }
  .analysis-header-cell {
    padding: 10px 16px;
  }
  .analysis-header-cell:first-child {
    width: 190px;
  }
  .analysis-header-cell:nth-child(2) {
    flex: 1;
    min-width: 450px;
  }
  .analysis-header-cell:last-child {
    width: 160px;
  }
  .analysis-row {
    display: flex;
  }
  .analysis-row:last-child {
    border-bottom: none;
  }
  .composition-row {
    display: flex;
    margin-top: 20px;
  }
  .composition-row:last-child {
    border-bottom: none;
  }
  .analysis-cell {
    padding:5px 16px;
    display: flex;
    align-items: center;
  }
  .analysis-cell:first-child {
    width: 190px;
    font-weight: 600;
    color: #4a5c63;
  }
  .analysis-cell:nth-child(2) {
    flex: 1;
    min-width: 450px;
  }
  .analysis-cell:last-child {
    width: 160px;
    text-align: left;
    color: #4a5c63;
    white-space: nowrap;
  }
  .header-labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 6px; /* match bar gap */
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    grid-column: 1;
  }
  .header-labels span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    line-height: 1.2;
    gap: 2px;
  }
  .header-labels .label-line {
    display: block;
    white-space: nowrap;
  }
  .metric-container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  .range-track {
    display: flex;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
  }
  .range-track span {
    flex: 1;
    height: 10px;
    background: #e2e6ed;
  }
  .range-track span.active {
    background: #ff6600;
  }
  .range-track span.partial {
    position: relative;
    overflow: hidden;
  }
  .range-track span.partial::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--fill-width, 0%);
    background: #ff6600;
  }
  .metric-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 80px;
    margin-left: 2rem;
  }
  .metric-meta .metric-value {
    font-weight: 700;
    color: #ff6600;
    white-space: nowrap;
    text-align: left;
  }
  .metric-meta .metric-status {
    color: #9ba7b0;
  }
  .normal-range {
    font-weight: 600;
  }
  .footnote {
    font-size: 0.9rem;
    color: #99989b;
    padding: 12px 20px 18px 20px;
  }
  
  .grid-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 10px;
  }
  .segment-card {
    border: 6px solid #e9eaeb;
   
    display: flex;
   
  }
  .segment-card .side-title {
    width: 74px;
    border-right: 6px solid #e9eaeb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    writing-mode: vertical-rl;
    font-size: 1.5rem;
  }
  .segment-body {
    flex: 1;
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
  }
  .segment-figure {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .segment-figure img {
    max-width: 200px;
    max-height: 300px;
    object-fit: contain;
    filter: contrast(3.5) brightness(0);
  }
  .segment-label {
    position: absolute;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .segment-label.left-upper,
  .segment-label.left-lower {
    align-items: flex-start;
  }
  .segment-label.right-upper,
  .segment-label.right-lower {
    align-items: flex-end;
  }
  .segment-label.torso {
    align-items: center;
  }
  .segment-label .label-text {
    font-weight: 400;
    display: flex;
    flex-direction: column;
  }
  .segment-label .label-text .label-part1 {
    display: block;
  }
  .segment-label .label-text .label-part2 {
    display: block;
  }
  .segment-label.left-upper .label-text .label-part2,
  .segment-label.left-lower .label-text .label-part2 {
    text-align: left;
  }
  .segment-label.right-upper .label-text .label-part2,
  .segment-label.right-lower .label-text .label-part2 {
    text-align: right;
  }
  .segment-label .label-value {
    font-weight: 600;
    color: #ff6600;
  }
  .segment-label .label-standard {
    font-size: 0.85rem;
    color: #ff6600;
    font-weight: 400;
  }
  .segment-label.left-upper .label-standard,
  .segment-label.left-lower .label-standard {
    text-align: left;
  }
  .segment-label.right-upper .label-standard,
  .segment-label.right-lower .label-standard {
    text-align: right;
  }
  .segment-label.torso .label-standard {
    text-align: center;
  }
  .segment-label.left-upper {
    top: 10%;
    left: 5%;
  }
  .segment-label.right-upper {
    top: 10%;
    right: 5%;
  }
  .segment-label.torso {
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
  }
  .segment-label.left-lower {
    bottom: 15%;
    left: 5%;
  }
  .segment-label.right-lower {
    bottom: 15%;
    right: 5%;
  }
  .bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .impedance-card,
  .obesity-card {
    border: 6px solid #e9eaeb;
    display: flex;
  }
  .impedance-card .side-title,
  .obesity-card .side-title {
    width: 74px;
    border-right: 6px solid #e9eaeb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    writing-mode: vertical-rl;
    font-size: 1.5rem;
  }
  .impedance-card .card-body,
  .obesity-card .card-body {
    flex: 1;
    font-size: 1.5rem;
  }
  .impedance-card table {
    width: 100%;
    border-collapse: collapse;
  }
  .impedance-card table thead th {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    background-color: #e9eaeb;
    color: #9ba7b0;
  }
  .impedance-card table tbody td {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: #ff6600;
  }
  .impedance-card table tbody td:first-child {
    color: #4a5c63;
    text-align: center;
  }
  .impedance-card table tbody tr:last-child td {
    border-bottom: none;
  }
  .obesity-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0;
    font-size: 1.5rem;
  }
  .obesity-table thead th {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    background: #e9eaeb;
    color: #9ba7b0;
  }
  .obesity-table thead th:nth-child(2),
  .obesity-table tbody td:nth-child(2) {
    border-right:3px solid #fff;
  }
  .obesity-table thead th:nth-child(3),
  .obesity-table tbody td:nth-child(3) {
    border-left: 3px solid #fff;
  }
  .obesity-table tbody td {
    padding: 10px;
    text-align: center;
    vertical-align: middle;
  }
  .obesity-table tbody td.ob-title {
    font-weight: 600;
    background: #e9eaeb;
  }
  .obesity-table tbody td.ob-value {
    font-weight: 700;
    color: #ff6600;
  }
  .obesity-table tbody tr:last-child td {
    border-bottom: none;
  }
  .progress {
    width: 100%;
    height: 10px;
    background: #fff;
    position: relative;
    margin-top: 8px;
    border-left: 3px solid #9b999a;
    border-right: 3px solid #9b999a;
    border-bottom: 3px solid #9b999a;
    box-sizing: border-box;
  }
  .progress::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0px;
    background: #ff6600;
  }
  .progress--whr::after {
    width: 65%;
  }
  .progress--whr {
    background-color: #fff;
  }
  .progress--whr::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0px;
    background-image: 
      linear-gradient(to right, transparent calc(25% - 1.5px), #9b999a  calc(25% - 1.5px), #9b999a calc(25% + 1.5px), transparent calc(25% + 1.5px)),
      linear-gradient(to right, transparent calc(50% - 1.5px), #9b999a calc(50% - 1.5px), #9b999a calc(50% + 1.5px), transparent calc(50% + 1.5px));
    background-position: 0 0, 0 0;
    background-repeat: no-repeat;
    background-size: 100% 100%, 100% 100%;
    z-index: 2;
    pointer-events: none;
  }
  .progress--visceral::after {
    width: 70%;
  }
  .progress--visceral {
    background-color: #fff;
  }
  .progress--visceral::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0px;
    background-image: 
      linear-gradient(to right, transparent calc(50% - 1.5px), #9b999a calc(50% - 1.5px), #9b999a calc(50% + 1.5px), transparent calc(50% + 1.5px));
    background-position: 0 0;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    z-index: 2;
    pointer-events: none;
  }
  .progress--visceral + .scale-labels span:nth-child(2) {
    left: 50%;
    transform: translateX(-50%);
  }
  .obesity-table td[colspan="2"] > div > span[style*="color: #ff6600"] {
    width: 60px;
    flex-shrink: 0;
    text-align: left;
  }
  .obesity-table td[colspan="2"] > div > div[style*="flex: 1"] {
    min-width:280px;
    max-width:280px;
  }
  .scale-labels {
    display: flex;
    position: relative;
    font-size: 1rem;
    color: #9ba7b0;
    margin-top: 6px;
    height: 30px;
  }
  .scale-labels span {
    position: absolute;
    white-space: nowrap;
  }
  .scale-labels span:first-child {
    left: 0;
  }
  .scale-labels span:last-child {
    right: 0;
    white-space: normal;
    text-align: right;
    line-height: 1.2;
  }
  .progress--whr + .scale-labels span:nth-child(2) {
    left: 25%;
    transform: translateX(-50%);
  }
  .progress--whr + .scale-labels span:nth-child(3) {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Print layout tweaks */
  @media print {
    @page {
      size: A4 portrait;
      margin: 0;
    }
    * {
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    html, body {
      width: 210mm;
      height: auto;
      background: #ffffff;
    }
    body {
      margin: 0;
      display: block;
    }
    .hc-report {
      width: auto;
      height: auto;
      padding: 32px;
      margin: 0;
      box-shadow: none;
      overflow: visible;
      transform-origin: top left;
      transform: none;
      zoom: 0.58; /* shrink to fit A4 height */
      page-break-inside: avoid;
      page-break-after: avoid;
      break-inside: avoid;
    }
    .hc-header {
      page-break-inside: avoid;
      break-inside: avoid;
    }
    .hc-user-cell {
      min-height: auto;
    }
    .hc-user-cell .data-nameid {
      line-height: 1.3;
    }
  }
