/* Arco Core – steel tube pages (/torud/, /torud/<liik>/). Ported from design/prototype/css/torud.css,
   scoped to .arco-tubes; uses the theme tokens (--ink, --accent, --line … from the theme's sections.css). */
.arco-tubes { --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --ease: cubic-bezier(.2, .7, .2, 1); --shadow: 0 1px 2px rgba(1,33,4,.05), 0 12px 32px -12px rgba(1,33,4,.18); --header-h: 80px; --steel-lo: #7D8A80; --section: clamp(64px, 5vw + 40px, 120px); }
.arco-tubes .wrap { width: min(1240px, 100% - 2 * clamp(16px, 4vw, 32px)); margin-inline: auto; }
.arco-tubes .eyebrow { margin: 0 0 12px; }
.arco-tubes h1, .arco-tubes h2, .arco-tubes h3 { margin: 0; }
.arco-tubes .wp-element-button.is-outline { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.arco-tubes .wp-element-button.is-outline:hover { background: var(--accent); color: #fff; }
.arco-tubes [data-add-current][aria-pressed="true"] { background: var(--ink); }


.arco-tubes .crumbs { padding-top: 28px; }
.arco-tubes .crumbs ol{ display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: var(--step--1); color: var(--muted); }
.arco-tubes .crumbs li + li::before{ content: "/"; margin: 0 10px; color: var(--line); color: var(--steel); }
.arco-tubes .crumbs a{ color: var(--muted); text-decoration: none; }
.arco-tubes .crumbs a:hover{ color: var(--accent); text-decoration: underline; }
.arco-tubes .crumbs [aria-current]{ color: var(--head); font-weight: 500; }

.arco-tubes .tube-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; padding-top: 28px; padding-bottom: 40px; }
.arco-tubes .tube-intro h1{ font-size: var(--step-4); margin-bottom: 16px; }
.arco-tubes .lead{ font-size: var(--step-1); line-height: 1.5; color: var(--muted); margin: 0 0 28px; max-width: 46ch; }
.arco-tubes .tube-stats{ display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; }
.arco-tubes .tube-stats div{ display: grid; gap: 2px; }
.arco-tubes .tube-stats dt{ order: 2; font-size: var(--step--1); color: var(--muted); }
.arco-tubes .tube-stats dd{ order: 1; margin: 0; font: 600 var(--step-2)/1.1 var(--font-display); color: var(--head); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.arco-tubes .tube-stats dd small{ font-size: .55em; font-weight: 500; color: var(--muted); margin-left: 3px; }

.arco-tubes .tube-types ul{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.arco-tubes .tube-types a{
  display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--head); font: 500 .9375rem/1.2 var(--font-body);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.arco-tubes .tube-types a:hover{ border-color: var(--accent); transform: translateY(-1px); }
.arco-tubes .tube-types a[aria-current="page"]{ background: var(--ink); border-color: var(--ink); color: #fff; }
.arco-tubes .tube-types svg{ width: 34px; height: 34px; }
.arco-tubes .tube-types .ico-o{ fill: none; stroke: currentColor; stroke-width: 2.2; }
.arco-tubes .tube-types a[aria-current="page"] .ico-o{ stroke: var(--accent-on-dark); }

.arco-tubes .tube-overview { padding-bottom: var(--section); }
.arco-tubes .type-cards{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.arco-tubes .type-card{ position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.arco-tubes .type-card:hover{ border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.arco-tubes .type-card .tube-drawing{ display: block; width: 100%; height: auto; background: var(--surface); border-bottom: 1px solid var(--line); }
.arco-tubes .type-card-body{ display: grid; gap: 6px; padding: 20px 22px 22px; }
.arco-tubes .type-card h2{ font-size: var(--step-1); }
.arco-tubes .type-card h2 a{ color: inherit; text-decoration: none; }
.arco-tubes .type-card h2 a::after{ content: ""; position: absolute; inset: 0; }
.arco-tubes .type-card p{ margin: 0; color: var(--muted); font-size: .9375rem; }
.arco-tubes .type-card .meta{ font-variant-numeric: tabular-nums; color: var(--head); font-weight: 500; }

.arco-tubes .tube-tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; padding-bottom: var(--section); }
.arco-tubes .drawing-card{ position: sticky; top: calc(var(--header-h) + 16px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); overflow: hidden; }
.arco-tubes .drawing-head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; }
.arco-tubes .drawing-kicker{ margin: 0 0 4px; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.arco-tubes .drawing-head h2{ font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.arco-tubes .view-switch{ display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.arco-tubes .view-switch button{ min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font: 600 .8125rem/1 var(--font-body); color: var(--muted); cursor: pointer; }
.arco-tubes .view-switch [aria-pressed="true"]{ background: var(--paper); color: var(--head); box-shadow: 0 1px 3px rgba(1,33,4,.15); }

.arco-tubes .drawing-stage{ position: relative; margin: 0 14px; border-radius: var(--r-md); background:
  linear-gradient(var(--surface), var(--surface)) padding-box; overflow: hidden; aspect-ratio: 600 / 360; }
.arco-tubes .drawing-stage::before{ 
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 20px 20px; background-position: -1px -1px;
}

.arco-tubes .drawing-svg, .arco-tubes .drawing-3d{ position: absolute; inset: 0; }
.arco-tubes .drawing-3d canvas{ width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.arco-tubes .drawing-3d canvas:active{ cursor: grabbing; }
.arco-tubes .drawing-3d .hint{ position: absolute; left: 12px; bottom: 8px; margin: 0; font-size: .75rem; color: var(--muted); }

.arco-tubes .tube-drawing { width: 100%; height: 100%; display: block; font: 500 13px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.arco-tubes .tube-drawing .td-obj{ fill: none; stroke: var(--head); stroke-width: 1.8; stroke-linejoin: round; }
.arco-tubes .tube-drawing .td-sec{ stroke: none; }
.arco-tubes .tube-drawing pattern line{ stroke: var(--accent); stroke-width: 1.1; }
.arco-tubes .tube-drawing .td-sec{ fill-opacity: 1; }
.arco-tubes .tube-drawing .td-hid{ fill: none; stroke: var(--steel-lo); stroke-width: 1; stroke-dasharray: 6 4; }
.arco-tubes .tube-drawing .td-shade{ fill: none; stroke: var(--steel); stroke-width: 1; }
.arco-tubes .tube-drawing .td-brk{ fill: none; stroke: var(--head); stroke-width: 1.2; }
.arco-tubes .tube-drawing .td-axis{ stroke: var(--steel-lo); stroke-width: .8; stroke-dasharray: 14 3 2 3; }
.arco-tubes .tube-drawing .td-dim line, .arco-tubes .tube-drawing .td-dim polyline{ fill: none; stroke: var(--muted); stroke-width: .9; }
.arco-tubes .tube-drawing .td-ext{ stroke-width: .7 !important; }
.arco-tubes .tube-drawing .td-dim text{ fill: var(--head); font-weight: 600; }
.arco-tubes .tube-drawing .td-leader circle{ fill: var(--muted); }
.arco-tubes .tube-drawing marker path{ fill: var(--muted); }
.arco-tubes .tube-drawing .td-holes circle{ fill: var(--surface); stroke: var(--head); stroke-width: 1; }
.arco-tubes .tube-drawing .td-note{ fill: var(--muted); font-size: 11px; font-style: italic; }
.arco-tubes .tube-drawing .td-cap text{ fill: var(--steel-lo); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; }
.arco-tubes .tube-drawing .td-grid path{ stroke: none; }

@media (prefers-reduced-motion: no-preference) {
  .arco-tubes .drawing-svg.is-new .td-draw{ stroke-dasharray: 1; animation: td-draw .9s var(--ease) both; }
  .arco-tubes .drawing-svg.is-new .td-sec{ animation: td-fade .5s .45s var(--ease) both; }
  .arco-tubes .drawing-svg.is-new .td-dim, .arco-tubes .drawing-svg.is-new .td-hid, .arco-tubes .drawing-svg.is-new .td-holes{ animation: td-fade .45s .55s var(--ease) both; }
}
@keyframes td-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes td-fade { from { opacity: 0; } to { opacity: 1; } }

.arco-tubes .spec{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 14px 22px 0; border-top: 1px solid var(--line); }
.arco-tubes .spec div{ padding: 12px 0; border-bottom: 1px solid var(--line); }
.arco-tubes .spec div:nth-child(odd){ padding-right: 12px; }
.arco-tubes .spec dt{ font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.arco-tubes .spec dd{ margin: 0; font-weight: 600; color: var(--head); font-variant-numeric: tabular-nums; }
.arco-tubes .spec .spec-wide{ grid-column: 1 / -1; }
.arco-tubes .drawing-note{ margin: 12px 22px 0; font-size: .8125rem; color: var(--muted); }
.arco-tubes .drawing-actions{ display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 22px 22px; }
.arco-tubes .drawing-actions .btn{ flex: 1 1 auto; }
.arco-tubes .drawing-actions [data-add-current][aria-pressed="true"]{ --_bg: var(--ink); --_bd: var(--ink); }

.arco-tubes .stock-head{ display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.arco-tubes .stock-head h2{ font-size: var(--step-2); }
.arco-tubes .stock-search{ position: relative; display: block; flex: 0 1 300px; }
.arco-tubes .stock-search svg{ position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.arco-tubes .stock-search input{ width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; color: var(--head); }
.arco-tubes .stock-search input:focus{ outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(55,122,0,.15); }
.arco-tubes .stock-count{ margin: 0 0 14px; font-size: var(--step--1); color: var(--muted); }

.arco-tubes .table-scroll{ border: 1px solid var(--line); border-radius: var(--r-md); overflow: auto; max-height: min(70vh, 760px); }
.arco-tubes .stock-table{ width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.arco-tubes .stock-table thead th{ position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font: 600 .75rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.arco-tubes .stock-table td{ padding: 0 14px; height: 48px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink); }
.arco-tubes .stock-table tr:last-child td{ border-bottom: 0; }
.arco-tubes .stock-table .num{ text-align: right; }
.arco-tubes .stock-table .col-desc{ color: var(--muted); font-size: .8125rem; line-height: 1.35; white-space: normal; }
.arco-tubes .stock-table tbody tr{ transition: background .15s var(--ease); }
.arco-tubes .stock-table tbody tr:hover{ background: #f8faf7; }
.arco-tubes .stock-table tbody tr.is-current{ background: var(--mint); }
.arco-tubes .stock-table tbody tr.is-current .size-btn{ color: var(--accent-press); }
.arco-tubes .size-btn{ display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; font: 600 .9375rem/1 var(--font-body); color: var(--head); cursor: pointer; font-variant-numeric: tabular-nums; }
.arco-tubes .size-btn::before{ content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--steel); transition: background .2s, border-color .2s; }
.arco-tubes .is-current .size-btn::before{ background: var(--accent); border-color: var(--accent); }
.arco-tubes .size-btn:hover{ color: var(--accent); }
.arco-tubes .add-btn{ display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); color: var(--accent); cursor: pointer; transition: all .2s var(--ease); }
.arco-tubes .add-btn svg{ width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.arco-tubes .add-btn:hover{ border-color: var(--accent); }
.arco-tubes .add-btn[aria-pressed="true"]{ background: var(--accent); border-color: var(--accent); color: #fff; }
.arco-tubes .add-btn[aria-pressed="true"] .plus-v{ display: none; }
.arco-tubes .stock-empty{ padding: 24px; text-align: center; color: var(--muted); }
.arco-tubes .stock-note{ margin-top: 20px; padding: 18px 20px; border-radius: var(--r-md); background: var(--mint); border: 1px solid #cfe8d1; }
.arco-tubes .stock-note p{ margin: 0; }
.arco-tubes .stock-note p + p{ margin-top: 6px; }

@media (max-width: 1080px) {
  .arco-tubes .tube-intro{ grid-template-columns: minmax(0, 1fr); align-items: start; }
  .arco-tubes .tube-tool{ grid-template-columns: minmax(0, 1fr); }
  .arco-tubes .drawing-card{ position: static; }
  
  .arco-tubes .type-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .arco-tubes .tube-types ul{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arco-tubes .type-cards{ grid-template-columns: 1fr; }
  .arco-tubes .tube-stats{ gap: 12px 28px; }
  .arco-tubes .drawing-head{ padding: 16px 16px 10px; }
  .arco-tubes .drawing-stage{ margin: 0 8px; }
  .arco-tubes .spec{ margin: 12px 16px 0; }
  .arco-tubes .drawing-note{ margin: 10px 16px 0; }
  .arco-tubes .drawing-actions{ padding: 14px 16px 18px; }
  .arco-tubes .col-desc{ display: none; }
  .arco-tubes .stock-table td, .arco-tubes .stock-table th{ padding-left: 10px; padding-right: 10px; }
  .arco-tubes .stock-search{ flex-basis: 100%; }
  
  .arco-tubes .table-scroll{ max-height: none; }
}
.arco-tubes .stock-table tbody th{ position: static; padding: 0 14px; background: none; font: inherit; text-transform: none; letter-spacing: 0; color: inherit; border-bottom: 1px solid var(--line); }
.arco-tubes .stock-table tr:last-child th{ border-bottom: 0; }
@media (max-width: 640px) { .arco-tubes .stock-table tbody th{ padding: 0 10px; } }

.arco-tubes .quote-band { padding-block: var(--section); background: var(--surface); border-top: 1px solid var(--line); }
.arco-tubes .quote-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.arco-tubes .quote-contact h2 { margin-bottom: 24px; }
.arco-tubes .person--wide { background: var(--paper); max-width: 420px; }
.arco-tubes .quote-box { display: grid; gap: 16px; padding: 28px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); }
.arco-tubes .quote-box h3 { font-size: var(--step-1); }
.arco-tubes .picked { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.arco-tubes .picked li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--mint); color: var(--ink); font-size: .875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.arco-tubes .picked li button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; }
.arco-tubes .picked li button:hover { background: rgba(1,33,4,.08); color: var(--head); }
.arco-tubes .picked-empty { margin: 0; font-size: .9375rem; color: var(--muted); }
.arco-tubes .quote-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.arco-tubes .quote-mail { color: var(--muted); font-size: .9375rem; }
@media (max-width: 1080px) { .arco-tubes .quote-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 640px) { .arco-tubes .quote-box { padding: 20px 16px; } }

/* Description sits as a small second line under the size (one line, no 3-line wrap); the old column stays in the DOM for
   the spec card (tubes.js reads cells[4]) but is not shown. */
.arco-tubes .stock-table .col-desc{ display: none; }
.arco-tubes .stock-table tbody th{ padding-block: 6px; }
.arco-tubes .stock-table .size-btn{ min-height: 30px; }
.arco-tubes .size-desc{ display: block; padding-left: 16px; margin-top: -2px; font-size: .75rem; line-height: 1.3; color: var(--muted); white-space: nowrap; }

@media (max-width: 640px) {
  /* phone: material is shown in the drawing card, so the table keeps size / length / weight / + and fits the screen */
  .arco-tubes .stock-table th:nth-child(4), .arco-tubes .stock-table td:nth-child(4){ display: none; }
  .arco-tubes .size-desc{ display: none; }
  .arco-tubes .stock-table thead th{ white-space: normal; letter-spacing: .04em; }
  .arco-tubes .stock-table td:last-child{ position: sticky; right: 0; background: inherit; padding-right: 8px; }
  .arco-tubes .stock-table tbody tr{ background: var(--paper); }

  /* type picker: one swipeable row of chips instead of six big tiles */
  .arco-tubes .tube-types{ margin-inline: -16px; }
  .arco-tubes .tube-types ul{ display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .arco-tubes .tube-types ul::-webkit-scrollbar{ display: none; }
  .arco-tubes .tube-types li{ flex: none; scroll-snap-align: start; }
  .arco-tubes .tube-types a{ grid-template-columns: 24px auto; min-height: 44px; padding: 6px 14px 6px 10px; border-radius: 999px; white-space: nowrap; font-size: .875rem; }
  .arco-tubes .tube-types svg{ width: 24px; height: 24px; }
}
.arco-tubes .stock-table tbody th{ text-align: left; }
@media (min-width: 641px) {
  .arco-tubes .stock-table td, .arco-tubes .stock-table thead th{ padding-left: 12px; padding-right: 12px; }
  .arco-tubes .stock-table td:last-child{ padding-right: 10px; }
}
.arco-tubes .size-desc{ white-space: normal; max-width: 200px; }
@media (max-width: 640px) { .arco-tubes .tube-types ul{ scroll-padding-inline: 16px; } }
