* {
      box-sizing: border-box;
}

body {
      margin: 0;
      font-family: Arial, Helvetica, sans-serif;
      background: #f7f8fa;
      color: #111827;
      line-height: 1.6;
}

.container {
      width: min(1100px, 92%);
      margin: auto;
}

/* Header */

.site-header {
      background: #ffffff;
      border-bottom: 1px solid #e5e7eb;
}

.nav {
      min-height: 68px;
      display: flex;
      align-items: center;
      justify-content: space-between;
}

.brand {
      color: #111827;
      text-decoration: none;
      font-size: 21px;
      font-weight: 700;
}

nav {
      display: flex;
      gap: 24px;
}

nav a {
      color: #4b5563;
      text-decoration: none;
}

nav a:hover {
      color: #111827;
}

/* Hero */

.hero {
      text-align: center;
      padding: 70px 20px 45px;
}

.badge {
      display: inline-block;
      padding: 6px 12px;
      border-radius: 999px;
      background: #eef2ff;
      color: #4338ca;
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 15px;
}

.hero h1 {
      margin: 0;
      font-size: clamp(36px, 6vw, 58px);
      letter-spacing: -1.5px;
}

.hero p {
      max-width: 680px;
      margin: 18px auto 0;
      color: #6b7280;
      font-size: 18px;
}

/* Tool */

.tool-section {
      padding-bottom: 70px;
}

.tool-card {
      background: #ffffff;
      border: 1px solid #e5e7eb;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 12px 35px rgba(0,0,0,0.06);
}

.tool-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 20px;
      margin-bottom: 18px;
}

.tool-header h2 {
      margin: 0 0 4px;
      font-size: 22px;
}

.tool-header p {
      margin: 0;
      color: #6b7280;
}

.indent-control {
      display: flex;
      align-items: center;
      gap: 8px;
}

.indent-control label {
      font-size: 14px;
      color: #6b7280;
}

select {
      padding: 9px 10px;
      border: 1px solid #d1d5db;
      border-radius: 8px;
      background: #ffffff;
}

/* Editor */

textarea {
      display: block;
      width: 100%;
      min-height: 330px;
      resize: vertical;
      padding: 18px;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      outline: none;
      font-family: "Courier New", monospace;
      font-size: 15px;
      line-height: 1.6;
      background: #fafafa;
}

textarea:focus {
      border-color: #6b7280;
}

/* Buttons */

.actions,
.result-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
}

.actions {
      margin-top: 14px;
}

button {
      border: 0;
      border-radius: 8px;
      padding: 11px 17px;
      background: #111827;
      color: #ffffff;
      font-weight: 700;
      cursor: pointer;
}

button:hover {
      opacity: 0.85;
}

button.secondary {
      background: #e5e7eb;
      color: #111827;
}

/* Status */

.status {
      min-height: 25px;
      margin: 14px 0;
      font-weight: 600;
}

/* Result */

.result-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 15px;
      margin-top: 10px;
      margin-bottom: 10px;
}

.result-header h2 {
      margin: 0;
      font-size: 20px;
}

pre {
      margin: 0;
      min-height: 220px;
      padding: 20px;
      overflow: auto;
      background: #111827;
      color: #f9fafb;
      border-radius: 10px;
      font-family: "Courier New", monospace;
      white-space: pre-wrap;
      word-break: break-word;
}

/* Content */

.content {
      background: #ffffff;
      padding: 70px 0;
}

.content-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 280px;
      gap: 50px;
}

.content h2 {
      margin-top: 35px;
      font-size: 26px;
}

.content h2:first-child {
      margin-top: 0;
}

.content p,
.content li {
      color: #4b5563;
}

.content li {
      margin-bottom: 8px;
}

/* Sidebar */

.side-card {
      position: sticky;
      top: 20px;
      padding: 20px;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      background: #f9fafb;
}

.side-card h3 {
      margin-top: 0;
}

.side-card a {
      display: block;
      padding: 8px 0;
      color: #374151;
      text-decoration: none;
}

.side-card a:hover {
      text-decoration: underline;
}

/* Footer */

footer {
      padding: 30px 0;
      text-align: center;
      color: #6b7280;
}

/* Mobile */

@media (max-width: 700px) {

      .nav {
                padding: 16px 0;
                align-items: flex-start;
      }

      nav {
                display: none;
      }

      .hero {
                padding-top: 50px;
      }

      .tool-card {
                padding: 16px;
      }

      .tool-header {
                flex-direction: column;
                align-items: flex-start;
      }

      .indent-control {
                width: 100%;
      }

      select {
                flex: 1;
      }

      .result-header {
                align-items: flex-start;
                flex-direction: column;
      }

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

      .side-card {
                position: static;
      }

      button {
                flex: 1;
      }
}
