/* ==========================================================================
   Parent toolkit — workspace layout
   Tool rail on the left, working panel in the middle, dark readout on the
   right. One tool visible at a time, so the page stays short.
   ========================================================================== */

/* ---------- Shell ---------- */
.pc-tw {
  display: grid; grid-template-columns: 210px minmax(0, 1fr);
  border: 1px solid var(--pc-border); border-radius: 22px;
  background: var(--pc-surface); overflow: hidden;
  box-shadow: 0 1px 2px rgba(46, 42, 34, .04), 0 12px 30px rgba(46, 42, 34, .07);
  margin: 8px 0 56px;
}

/* ---------- Tool rail ---------- */
.pc-tw-rail {
  display: flex; flex-direction: column; gap: 4px; padding: 16px;
  background: var(--pc-surface2); border-right: 1px solid var(--pc-border);
}
.pc-tw-tab {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 12px 13px; border: none; border-radius: 12px; cursor: pointer;
  background: none; color: var(--pc-muted);
  font-family: var(--pc-sans); font-size: 14px; font-weight: 800; text-align: left;
  transition: background .16s ease, color .16s ease;
}
.pc-tw-tab:hover { background: rgba(46, 42, 34, .05); color: var(--pc-ink); }
.pc-tw-tab.is-active { background: var(--pc-ink); color: var(--pc-bg); }

.pc-tw-tab-icon {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(46, 42, 34, .06);
}
.pc-tw-tab.is-active .pc-tw-tab-icon { background: rgba(255, 255, 255, .14); }
.pc-tw-tab .pc-icon { opacity: 1; color: currentColor; }

/* ---------- Panels ---------- */
.pc-tw-panel { display: grid; grid-template-columns: 1fr 380px; min-height: 340px; }
.pc-tw-panel[hidden] { display: none; }

.pc-tw-form { padding: 30px 32px; }
.pc-tw-form h2 { font-size: 26px; margin: 0 0 8px; }
.pc-tw-form > p { font-size: 14.5px; color: var(--pc-muted); line-height: 1.6; margin: 0 0 22px; max-width: 460px; }

.pc-tools label {
  display: block; font-weight: 800; font-size: 11px; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--pc-muted2);
}
.pc-tools .pc-tw-form input,
.pc-tools .pc-tw-form select {
  width: 100%; margin-bottom: 16px; padding: 12px 14px;
  font-size: 15px; border-radius: 11px;
}
.pc-tools select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232E2A22' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.pc-tw-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pc-tw-form .pc-btn { padding: 13px 26px; border-radius: 12px; }
.pc-tw-error { color: #C0562E; font-size: 13px; font-weight: 700; margin: 10px 0 0; min-height: 1em; }
.pc-tw-note { font-size: 12px; color: var(--pc-muted3); line-height: 1.55; margin: 16px 0 0; }

/* ---------- Readout ---------- */
.pc-tw-read {
  position: relative; overflow: hidden;
  padding: 30px 32px; color: #fff;
  background: linear-gradient(155deg, #35707F 0%, #2A5C69 55%, #21454F 100%);
  display: flex; flex-direction: column; justify-content: center;
}
.pc-tw-read::before {
  content: ''; position: absolute; inset: -30% -20% auto auto;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 210, 78, .18), transparent 62%);
  pointer-events: none;
}
.pc-tw-read > * { position: relative; z-index: 1; }

.pc-tw-idle {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; color: rgba(255, 255, 255, .6); font-weight: 700; font-size: 14px;
}
.pc-tw-idle .pc-icon { opacity: .5; color: #fff; }
.pc-tw-idle[hidden] { display: none; }

.pc-tw-label {
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--pc-teal-soft); margin-bottom: 8px;
}
.pc-tw-figure {
  font-family: var(--pc-serif); font-style: italic; font-weight: 700;
  font-size: 34px; line-height: 1.15; color: #fff;
}

.pc-tw-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.pc-tw-chips div {
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px; padding: 11px 15px; min-width: 78px;
}
.pc-tw-chips strong {
  display: block; font-family: var(--pc-serif); font-style: italic;
  font-weight: 700; font-size: 22px; color: #fff;
}
.pc-tw-chips span { font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, .7); }
.pc-tw-read .pc-tw-note { color: rgba(255, 255, 255, .6); }

/* Calculator results share one shape: value, qualifier, caveat. */
.pc-tw-out[hidden] { display: none; }
.pc-tw-out strong {
  display: block; font-family: var(--pc-serif); font-style: italic; font-weight: 700;
  font-size: 42px; line-height: 1.1; color: #fff;
}
.pc-tw-out span {
  display: inline-block; margin-top: 10px; padding: 7px 13px; border-radius: 100px;
  background: var(--pc-yellow); color: var(--pc-ink); font-size: 12px; font-weight: 800;
}
.pc-tw-out small {
  display: block; margin-top: 16px; font-size: 12px; line-height: 1.6;
  color: rgba(255, 255, 255, .62);
}

/* ---------- Contraction timer ---------- */
.pc-timer-actions { display: flex; gap: 10px; }
.pc-timer-actions .pc-btn { flex: 1; }
.pc-tw-clock { font-size: 46px; letter-spacing: .02em; }

.pc-timer-log { list-style: none; margin: 0; padding: 0; max-height: 150px; overflow-y: auto; }
.pc-timer-log:not(:empty) { margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); }
.pc-timer-log li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 13px;
}
.pc-timer-log strong { font-family: var(--pc-serif); font-style: italic; font-size: 17px; color: #fff; }
.pc-timer-log span { color: rgba(255, 255, 255, .62); font-weight: 700; font-size: 12px; }

/* ==========================================================================
   Checklists
   ========================================================================== */
.pc-lists-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.pc-lists-head p { color: var(--pc-muted); margin: 0; font-size: 15px; }

/* One full-width row per list: dark summary panel on the left, the items
   themselves in columns on the right. */
.pc-checklist-grid { display: flex; flex-direction: column; gap: 18px; }

.pc-checklist {
  display: grid; grid-template-columns: 290px minmax(0, 1fr);
  border: 1px solid var(--pc-border); border-radius: 20px;
  background: var(--pc-surface); overflow: hidden;
  box-shadow: 0 1px 2px rgba(46, 42, 34, .04), 0 8px 22px rgba(46, 42, 34, .05);
  transition: box-shadow .25s ease;
}
.pc-checklist:hover { box-shadow: 0 2px 4px rgba(46, 42, 34, .05), 0 16px 34px rgba(46, 42, 34, .10); }

/* ---------- Summary side ---------- */
.pc-checklist-side {
  position: relative; overflow: hidden;
  padding: 26px 24px; color: #fff;
  background: linear-gradient(155deg, #35707F 0%, #2A5C69 60%, #21454F 100%);
  display: flex; flex-direction: column;
}
.pc-checklist-side::before {
  content: ''; position: absolute; inset: auto -30% -40% auto;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 210, 78, .2), transparent 62%);
  pointer-events: none;
}
.pc-checklist-side > * { position: relative; z-index: 1; }

.pc-checklist-num {
  font-family: var(--pc-serif); font-style: italic; font-weight: 700;
  font-size: 15px; color: var(--pc-yellow); letter-spacing: .04em;
}
.pc-checklist-title {
  font-family: var(--pc-serif); font-style: italic; font-weight: 700;
  font-size: 23px; line-height: 1.2; color: #fff; margin: 4px 0 0;
}

.pc-checklist-meter { margin: 18px 0 20px; }
.pc-checklist-progress {
  height: 6px; border-radius: 100px; overflow: hidden;
  background: rgba(255, 255, 255, .18);
}
.pc-checklist-progress span {
  display: block; height: 100%; width: 0;
  background: var(--pc-yellow); transition: width .3s ease;
}
.pc-checklist-count {
  margin-top: 9px; font-size: 12px; font-weight: 800;
  color: rgba(255, 255, 255, .75);
}

.pc-checklist-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pc-checklist-submit {
  display: block; width: 100%; text-align: center;
  padding: 12px 14px; border-radius: 11px; font-size: 13.5px;
}
.pc-checklist-submit[hidden] { display: none; }
.pc-checklist-clear {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--pc-sans); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; color: rgba(255, 255, 255, .7);
}
.pc-checklist-clear:hover { color: #fff; }

/* ---------- Items ---------- */
.pc-checklist-items {
  padding: 20px 24px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px;
  align-content: start;
}

.pc-check-item {
  display: flex; align-items: center; gap: 11px; margin: 0;
  padding: 11px 14px; cursor: pointer; color: #4C463A;
  border: 1px solid var(--pc-border); border-radius: 12px; background: var(--pc-surface2);
  font-size: 13.5px; font-weight: 700; line-height: 1.3;
  text-transform: none; letter-spacing: 0;
  transition: border-color .15s ease, background .15s ease;
}
.pc-check-item:hover { border-color: var(--pc-border2); background: #fff; }
.pc-check-item.done { background: var(--pc-yellow-soft); border-color: var(--pc-border2); }

.pc-check-input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.pc-check-input:focus-visible + .pc-check-box { outline: 3px solid var(--pc-teal); outline-offset: 2px; }
.pc-check-box {
  width: 19px; height: 19px; flex: none; align-self: center;
  border: 1.5px solid #D8CDB5; border-radius: 6px; background: var(--pc-surface);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}
.pc-check-box::after {
  content: ''; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid var(--pc-ink); border-bottom: 2px solid var(--pc-ink);
  transform: rotate(-45deg) scale(0); transition: transform .15s ease;
}
.pc-check-item.done .pc-check-box { background: var(--pc-yellow); border-color: var(--pc-yellow); }
.pc-check-item.done .pc-check-box::after { transform: rotate(-45deg) scale(1); }
.pc-check-item.done .pc-check-label { color: var(--pc-muted2); }
.pc-check-label { flex: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .pc-tw-panel { grid-template-columns: 1fr 320px; }
  .pc-tw-form, .pc-tw-read { padding: 26px; }
}
@media (max-width: 900px) {
  .pc-tw { grid-template-columns: 1fr; }
  .pc-tw-rail {
    flex-direction: row; overflow-x: auto; border-right: none;
    border-bottom: 1px solid var(--pc-border); padding: 12px;
  }
  .pc-tw-tab { width: auto; flex: none; white-space: nowrap; }
  .pc-tw-panel { grid-template-columns: 1fr; }
  .pc-tw-read { min-height: 220px; }
  .pc-checklist { grid-template-columns: 1fr; }
  .pc-checklist-side { padding: 20px 22px; }
  .pc-checklist-actions { flex-direction: row; align-items: center; gap: 16px; margin-top: 16px; }
  .pc-checklist-submit { width: auto; }
}
@media (max-width: 620px) {
  .pc-tw-tab-name { display: none; }
  .pc-tw-tab { padding: 9px; }
  .pc-tw-pair { grid-template-columns: 1fr; }
  .pc-tw-form h2 { font-size: 22px; }
  .pc-tw-out strong { font-size: 34px; }
  .pc-tw-clock { font-size: 38px; }
  .pc-checklist-items { grid-template-columns: 1fr; }
}
