



#centerbody {
  background:#f4f7fb;
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    padding:20px;
}
button,
input,
textarea {
  font: inherit;
}




label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 118px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, .12);
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  outline: none;
  margin-bottom: 14px;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, .12);
}

output {
  display: block;
  word-break: break-word;
}


.container{
    background:#fff;
    width:100%;
    max-width:700px;
    padding:30px;
    border-radius:12px;
    box-shadow:0 5px 20px rgba(0,0,0,0.1);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: .82rem;
  letter-spacing: 0;
}



main {
  overflow: hidden;
}

.workspace {
  /* display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
  gap: clamp(22px, 4vw, 50px);
  align-items: stretch; */
  width: 90%;
  margin: 30px auto 0;
  /* min-height: calc(100vh - 102px); */
}

.intro-panel,
.tool-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}

.intro-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding: clamp(28px, 5vw, 48px);
  overflow: hidden;
}

.intro-panel::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -20px;
  width: 260px;
  height: 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='360' viewBox='0 0 520 360'%3E%3Crect width='520' height='360' fill='%23eaf8f5'/%3E%3Crect x='48' y='48' width='436' height='70' rx='12' fill='%23ffffff'/%3E%3Crect x='78' y='73' width='190' height='18' rx='9' fill='%232f6fed'/%3E%3Crect x='48' y='145' width='126' height='112' rx='12' fill='%23ffffff'/%3E%3Crect x='196' y='145' width='126' height='112' rx='12' fill='%23ffffff'/%3E%3Crect x='344' y='145' width='126' height='112' rx='12' fill='%23ffffff'/%3E%3Ccircle cx='111' cy='194' r='25' fill='%230f9f8f'/%3E%3Crect x='226' y='184' width='68' height='16' rx='8' fill='%23f2b84b'/%3E%3Cpath d='M374 211l20-40 20 40z' fill='%232f6fed'/%3E%3Crect x='48' y='283' width='436' height='40' rx='10' fill='%23151923'/%3E%3C/svg%3E");
  background-size: cover;
  border: 1px solid rgba(47, 111, 237, .16);
  border-radius: 8px;
  opacity: .88;
  transform: rotate(-4deg);
}

.intro-panel > * {
  position: relative;
  z-index: 1;
}


.tool-grid{
    display:grid;
    grid-template-columns:
        repeat(auto-fill,minmax(250px,1fr));
    gap:20px;
    margin-bottom: 50px;
}

.tool-card{
    display:block;
    padding:16px;
    border:1px solid #ddd;
    border-radius:10px;
    text-decoration:none;
    color:inherit;
    margin:20px;
}
h1,
h2,
h3,
p {
  margin-top: 0;

}
h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}
#results{
    margin-top:25px;
}

.title-card{
    background:#f8fafc;
    border-left:4px solid #2563eb;
    padding:12px;
    margin-bottom:10px;
    border-radius:6px;
    cursor:pointer;
    transition:.2s;
}

.title-card:hover{
    background:#eef4ff;
}
.lead {
  max-width: 540px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.metrics span {
  display: grid;
  gap: 3px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(217, 222, 232, .86);
  border-radius: 7px;
  background: white;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 750;
}

.metrics strong {
  color: var(--ink);
  font-size: 1.45rem;
}

.tool-shell {
  align-self: center;
  min-height: 520px;
  padding: clamp(18px, 3vw, 28px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.tab {
  min-height: 42px;
  background: #eef1f6;
  color: var(--muted);
  box-shadow: none;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--accent);
  color: white;
}

.tool {
  display: none;
}

.tool.is-active {
  display: grid;
  gap: 18px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.result-grid output,
.big-result,
.card output {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  padding: 16px;
}

.result-grid strong,
.big-result strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.result-grid span,
.big-result span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.meter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.meter {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e9f0;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
}

.hint {
  color: var(--muted);
  line-height: 1.55;
}

.fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.big-result {
  display: grid;
  gap: 6px;
  background: linear-gradient(135deg, var(--soft), var(--soft-2));
}

.category-band,
.growth-band {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto;
  padding: clamp(26px, 4vw, 42px) 0;
}

.contrast {
  width: 100%;
  padding: clamp(34px, 5vw, 62px) max(16px, calc((100vw - 1180px) / 2));
  background: #eef4f6;
}

.section-head {
  /* display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px; */
  margin-bottom: 24px;
  margin-top: 24px;

}
.card-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.3;
    margin-bottom: .75rem;
    color: var(--accent-2);
 
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.image-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  box-shadow: 0 12px 30px rgba(26, 38, 72, .08);
  margin-top: 20px;
  margin-bottom: 20px;
}

.card output {
  margin-top: 14px;
  min-height: 54px;
  font-weight: 850;
}

.image-inspector {
  grid-column: span 2;
}

.image-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-top: 12px;
  border: 1px dashed #aeb7c7;
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--muted);
  font-weight: 800;
  overflow: hidden;
}

.image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  background: white;
}

.image-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.image-stats output {
  margin-top: 0;
  min-height: 72px;
  background: var(--soft-2);
}

.image-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.2rem;
}

.image-stats span {
  color: var(--muted);
  font-size: .78rem;
}

.size-list {
  display: grid;
  gap: 8px;
}

.size-list button {
  justify-content: flex-start;
  background: #eef1f6;
  color: var(--ink);
  box-shadow: none;
}

.size-list button:hover {
  background: var(--soft);
}

.button-row,
.inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}

.button-row button {
  background: var(--accent);
}

.inline-controls label {
  flex: 1 1 120px;
}

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

.timer {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151923;
  color: white;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
}

.color-lab {
  display: grid;
  grid-template-columns: minmax(190px, .4fr) 1fr minmax(140px, .3fr);
  gap: 16px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 20px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 76px;
}

.swatch {
  border-radius: 7px;
  border: 1px solid rgba(21, 25, 35, .12);
}

.growth-band {
  display: grid;
  grid-template-columns: minmax(260px, .55fr) minmax(300px, 1fr);
  gap: clamp(22px, 5vw, 70px);
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.growth-band ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 700;
}

.writing-page {
  background:
    linear-gradient(180deg, rgba(234, 248, 245, .74), transparent 420px),
    #fbfcfe;
}

.writing-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, .72fr);
  gap: clamp(24px, 5vw, 62px);
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 22px;
  padding: clamp(28px, 5vw, 52px) 0;
}

.writing-hero h1 {
  max-width: 760px;
}

.writing-visual {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 24px;
  box-shadow: var(--shadow);
}

.writing-visual span {
  display: block;
  height: 18px;
  border-radius: 999px;
  background: var(--soft);
}

.writing-visual span:nth-child(2) {
  width: 82%;
  background: var(--soft-2);
}

.writing-visual span:nth-child(3) {
  width: 64%;
  background: #fff4d9;
}

.writing-visual strong {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  color: white;
  background: var(--ink);
  border-radius: 7px;
  padding: 0 16px;
}

.writer-workbench,
.generator-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.writer-workbench {
  display: grid;
  grid-template-columns: minmax(220px, .32fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.writer-tool-list,
.writer-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 30px rgba(26, 38, 72, .08);
}

.writer-tool-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.writer-tool {
  justify-content: flex-start;
  min-height: 44px;
  background: #eef1f6;
  color: var(--ink);
  box-shadow: none;
}

.writer-tool.is-active {
  background: var(--accent);
  color: white;
}

.writer-panel {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
}

.writer-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(3, auto);
  gap: 10px;
  align-items: end;
}

.writer-controls button {
  min-width: 86px;
}

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

.writer-grid textarea,
.generator-grid textarea {
  min-height: 280px;
}

.generator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.generator-grid .card {
  min-height: 0;
}

.generator-grid button {
  margin-top: 12px;
}

.generator-grid textarea {
  margin-top: 14px;
}



@media (max-width: 900px) {
  

  .workspace,
  .cards,
  .image-tools,
  .split-tools,
  .growth-band,
  .color-lab,
  .writing-hero,
  .writer-workbench,
  .writer-grid,
  .generator-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    min-height: 0;
  }

  .intro-panel,
  .tool-shell {
    min-height: auto;
  }

  .intro-panel::after {
    width: 190px;
    height: 132px;
    opacity: .62;
  }

  .fields,
  .result-grid,
  .image-stats,
  .metrics {
    grid-template-columns: 1fr;
  }

  .image-inspector {
    grid-column: auto;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .writer-controls {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .workspace,
  .category-band,
  .growth-band {
    width: min(100% - 22px, 1180px);
  }

  h1 {
    font-size: 2.35rem;
  }

  .tab {
    font-size: .85rem;
    padding: 0 8px;
  }

  .writer-controls {
    grid-template-columns: 1fr;
  }
}
